On 5/2/07, Dmitry Hazin <[EMAIL PROTECTED]> 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 ^/(.*)         http://www.site.ru/some/location/$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 xx.site.com and empty.

Also, use the RewriteLog to debug problems with mod_rewrite.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to