View Single Post
Old 11-15-2003, 01:06 AM  
jayeff
Confirmed User
 
Join Date: May 2001
Posts: 2,944
This example will redirect NON-english browsers:
RewriteEngine on
RewriteCond %{HTTP:Accept-Language} ^!(en)
RewriteRule ^(.*) http://www.somedomain.com/ [L]

This example will redirect spanish browsers (and you can do it for multiple languages with extra lines and an [OR] on all but the last Cond line):
RewriteEngine on
RewriteCond %{HTTP:Accept-Language} !(es)
RewriteRule ^(.*) http://www.somedomain.com/ [L]

But language redirection is very inaccurate. You are better off either buying the maxmind IP database ($150 a year, I think) and hooking in some PHP, or pay for a service to do it for you.
jayeff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote