Hello,
thanks a lot, I was sure, there must be an easier way to write the "or" condition :-)
Is there also something like that like:
if ({HTTP_HOST} == ^mail\.) | ({REQUEST_URI} == ^/webmail)
do something?
one thing is still not yet working:
And this how the http config file looks like now:
# redirect evey subdomain xx, yy nn -> nn on port 8991 with SSL (OK, working)
RewriteCond %{HTTP_HOST} ^(xx¦yy¦nn)\. [NC]
RewriteRule .* [
nn.example.com:8991%{REQUEST_URI}...] [L,R=permanent]
#redirect any subdomain starting with mail -> mail.example.com/webmail/ with SSL (NotOK, not working)
RewriteCond %{HTTP_HOST} ^mail\. [NC]
RewriteRule .* [
mail.example.com...] [L,R=permanent]
#redirect anything containing webmail -> mail.example.com/webmail/ with SSL (OK, working)
RewriteCond %{REQUEST_URI} ^/webmail. [NC]
RewriteRule .* [
mail.example.com...] [L,R=permanent]
and this is the https config (all is working as expected):
# redirect evey subdomain xx, yy nn -> nn on port 8991 with SSL
RewriteCond %{HTTP_HOST} ^(xx¦yy¦nn)\. [NC]
RewriteRule .* [
nn.example.com:8991%{REQUEST_URI}...] [L,R=permanent]
# pass through anything with [
mail.example.com...]
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^mail\.example\.com/webmail. [NC]
RewriteRule .* - [L]
#redirect anything containing webmail -> mail.example.com/webmail/ with SSL
RewriteCond %{REQUEST_URI} ^/webmail. [NC]
RewriteRule .* [
mail.example.com...] [L,R=permanent]
#redirect any subdomain starting with mail -> mail.example.com/webmail/ with SSL
RewriteCond %{HTTP_HOST} ^mail\. [NC]
RewriteRule .* [
mail.example.com...] [L,R=permanent]
The only thing not working is this one in the http (port 80) config file:
RewriteCond %{HTTP_HOST} ^mail\. [NC]
RewriteRule .* [
mail.example.com...] [L,R=permanent]
the same thing works in the SSL (port 443) config file and makes my head itch ;-)
thanks again
quwax
[edited by: quwax at 1:30 am (utc) on Feb 26, 2014]