Skip to content

Instantly share code, notes, and snippets.

@baldowl
Created October 19, 2011 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baldowl/1299102 to your computer and use it in GitHub Desktop.
Save baldowl/1299102 to your computer and use it in GitHub Desktop.
Nginx, try_files and the Accept-Language header
location / {
root /my/web/site;
# Note (1) the '/' before $lang and (2) the lack of '/' before $uri (which
# already starts with '/').
try_files /$lang$uri /$lang$uri.html /$lang$uri/ $uri $uri.html $uri/ =404;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment