httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] ServerAlias and redirecting, please help
Date Wed, 02 May 2007 13:19:28 GMT
On 5/2/07, Dmitry Hazin <> wrote:
> I tried the following directives to force redirect:

Well, I think the technique of having two <VirtualHost>s is clearer,
but anyway...

> RewriteCond %{HTTP_HOST}   ^xx\.site\.com [NC]
> RewriteCond %{HTTP_HOST}   ^$
> RewriteRule ^/(.*)$1 [L,R=301]

Delete the second RewriteCond. Those conditions must all be met for
the RewriteRule to be applied, and obviously the Host can't be
simultaneously and empty.

Also, use the RewriteLog to debug problems with mod_rewrite.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message