Created
January 28, 2015 20:45
-
-
Save samhernandez/12e5fbafb86934b4f8b0 to your computer and use it in GitHub Desktop.
Redirect to files that exist without the first language segment in the url
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
# For Drupal multilingual sites | |
# | |
# When the first segment of the url path is a language like 'en', 'fr', 'es' | |
# paths to files break because Drupal adds them to the base url. | |
# This turns `http://site.com/es/style.css` into `http://site.com/style.css` | |
# if the latter is actually a file. | |
RewriteCond %{DOCUMENT_ROOT}/$1 -f | |
RewriteRule ^/?\w{2}/(.+)$ %{DOCUMENT_ROOT}/$1 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment