This is a discussion on server-variables in RewriteCond? within the Linux Web Servers forums, part of the Web Server and Related Forums category; I've been trying to do this: RewriteCond %{HTTP_HOST} !%{SERVER_NAME} RewriteRule ^(.*)$ http://%{SERVER_NAME}$1 [R=301,L] as a generic ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've been trying to do this:
RewriteCond %{HTTP_HOST} !%{SERVER_NAME} RewriteRule ^(.*)$ http://%{SERVER_NAME}$1 [R=301,L] as a generic 301 all host names to the definitive server name, but it appears that I cannot simply insert a server-variable in the RHS of the RewriteCond. Is there any way round this, apart from using the actual server name on the RHS? |
| Thread Tools | |
| Display Modes | |
|
|