Created
February 20, 2012 22:53
-
-
Save gagarine/1872085 to your computer and use it in GitHub Desktop.
Apache redirect according to browser language
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Tested on Drupal 7 | |
## On frontpage redirect to /fr if the browser language start with fr | |
RewriteCond %{HTTP:Accept-Language} ^fr.*$ [NC] | |
RewriteCond %{REQUEST_URI} ^/$ [NC] | |
RewriteCond %{QUERY_STRING} !(^q\=) [NC] | |
RewriteRule ^(.*)$ /fr [L,R=302] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment