Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# http://unknownplace.org/memo/2009/06/17/1/
location / {
set $langprefix 'en';
if ($http_accept_language ~* 'ja') {
set $langprefix 'ja';
}
rewrite ^(.*)$ /$langprefix/$1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment