Welcome! Log In Create A New Profile

Advanced

Re: map $uri in 1.3.0+ NOT working in 1.6.0+

Valentin V. Bartenev
October 03, 2014 05:02AM
On Thursday 02 October 2014 23:08:53 nikolaos2012 wrote:
> We have the following code that worked in 1.3.16....
>
>
> # Map VWS URI's to HTTP ($use_secure=0), HTTPS ($use_secure=1) or keep same
> ($use_secure=2)
> map $uri $use_secure {
> default 0;
> ~^/sites/ 2;
> ~^/account/ 1;
> }
[..]

$uri in the "map" directive usually means that you're doing it wrong.

For mapping configuration on URIs there's special and highly optimized
directive, called "location".

The only reason to use map instead of location could be to save some
memory when you have thousands of URIs to map.

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

map $uri in 1.3.0+ NOT working in 1.6.0+

nikolaos2012 October 02, 2014 11:08PM

Re: map $uri in 1.3.0+ NOT working in 1.6.0+

nikolaos2012 October 03, 2014 12:58AM

Re: map $uri in 1.3.0+ NOT working in 1.6.0+

Valentin V. Bartenev October 03, 2014 05:02AM

Re: map $uri in 1.3.0+ NOT working in 1.6.0+

nikolaos2012 October 03, 2014 09:04AM

Re: map $uri in 1.3.0+ NOT working in 1.6.0+

Valentin V. Bartenev October 03, 2014 03:00PM

Re: map $uri in 1.3.0+ NOT working in 1.6.0+

nikolaos2012 October 04, 2014 12:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 179
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready