Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

redirect for visitors who use particular languages

4:58 am on Jan 24, 2004 (gmt 0)

New User

joined:Dec 28, 2002
votes: 0

that's an example, please check if everything is ok

RewriteEngine On
RewriteCond %{HTTP_ACCEPT_LANGUAGE} de.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} de-ch.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} at.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} en-gb.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} de-at.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} de-li.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} fr-ch.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} ch.* [NC,OR]
RewriteCond %{HTTP_ACCEPT_LANGUAGE} de-de.* [NC]
RewriteRule .* [myurl.com...] [R,L]

9:50 pm on Jan 24, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 20, 2003
votes: 0

I don't think you can use HTTP_ACCEPT_LANGUAGE that way, because I don't see it in the mod_rewrite [httpd.apache.org] documentation. AFAIK, you'd have to use a script to check that variable.