Hello,
How would you check for sth like HTTP:Accept-Language? and in general
all
headers? if it is equal to some value, empty or etc. Apache would allow
this
to be checked in a notation similar to the following inside a
mod_rewrite
config:
%{HTTP:Accept-Language}
Is there a similar variable to be used in nginx config?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,229839,229839#msg-229839
on 2012-08-17 12:23
on 2012-08-17 15:47
On Fri, Aug 17, 2012 at 06:23:04AM -0400, amonmitch wrote: Hi there, > How would you check for sth like HTTP:Accept-Language? and in general all > headers? if it is equal to some value, empty or etc. Apache would allow this > to be checked in a notation similar to the following inside a mod_rewrite > config: > > %{HTTP:Accept-Language} > > Is there a similar variable to be used in nginx config? variables are at http://nginx.org/en/docs/http/ngx_http_core_module... "map" is at http://nginx.org/r/map "if" is at http://nginx.org/r/if Be aware of when you shouldn't use "if" inside "location", such as is written at http://wiki.nginx.org/IfIsEvil Depending on what exactly you want to do, frequently "map" can be used instead of "if". f -- Francis Daly francis@daoine.org
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.