This file contains 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
# Redirect visitors who request the root domain path (e.g. www.mywebsite.ch) to the appropriate language version | |
# Fallback to English version if no matching browser language defined | |
# Based on language version being at e.g. www.mywebsite.ch/de/ | |
# This has no effect on any subpaths of the website, and therefore has no effect on e.g. WordPress admin. | |
# Using a 302 temporary redirect header stops the redirection from being cached in the browser. | |
# language is ES-MX (Mexico) | |
RewriteCond %{HTTP:Accept-Language} ^es-mx [NC] | |
RewriteRule ^$ /mx/ [L,R=302] |