Skip to content

Instantly share code, notes, and snippets.

@baldowl baldowl/gist:1299102
Created Oct 19, 2011

Embed
What would you like to do?
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
You can’t perform that action at this time.