httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Redirecting by languare with .htaccess
Date Mon, 02 Sep 2002 00:12:39 GMT
Craig Rose wrote:

> Have all the brousers that are "en" enabled stay at my site.
> All the ones that are "it" enabled to go to a different page on my site
> All the ones that are "de" enabled to go to another different page on my
> site
> And the remainder redirect to a completely different site.
> This is what I wrote, but it does not work.
> RewriteEngine on
> Options +FollowSymlinks
> RewriteBase /
> RewriteCond %{HTTP:Accept-Language} !^en [NC]
> RewriteRule ^(.it)
> RewriteRule ^(.de)
> RewriteRule ^(.*)
> Could anyone tell me what I'm doing wrong? Or make any recomendations?

RewriteRule's match URL-Paths, and nothing else.

RewriteCond %{HTTP:Accept-Language} !en [NC]
RewriteCond %{HTTP:Accept-Language} it [NC]
RewriteRule .* [R,L]

RewriteCond %{HTTP:Accept-Language} !en [NC]
RewriteCond %{HTTP:Accept-Language} de [NC]
RewriteRule .* [R,L]

RewriteCond %{HTTP:Accept-Language} !en [NC]
RewriteRule .*

Use the RewriteLog to see exactly what is working and what isn't.


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