How to rewrite location in nginx depending on the client-browser\'s language?
For example: My browser accept-language is \'uk,ru,en\'. When I request locati
So here's the compiled example for the original question (based on my case verified to work with nginx-1.1.x):
map $http_accept_language $lang { default en; ~ru ru; ~uk uk; } server { server_name mysite.org; # ... rewrite (.*) http://mysite.org/$lang$1; }