Welcome! Log In Create A New Profile

Advanced

Re: map within a map

October 23, 2014 05:02PM
On 23 Oct 2014, at 21:17, itpp2012 <nginx-forum@nginx.us> wrote:

> Can I use multiple maps with a single map ?
>
> For example;
>
> map $ngxvar1 $myvar1 {
> default 0;
> ~*string 1;
> }
> map $ngxvar2 $myvar2 {
> default 0;
> ~*string 1;
> }
> map $ngxvar3 $myvar3 {
> default 0;
> ~*string 1;
> $myvar1 1;
> $myvar2 1;
> }
>
> This way I would only have one IF $myvar3 ....., but obviously this example
> doesn't work, is this possible ?

You can try other path:

map $ngxvar1 $myvar1 {
default $myvar2;
~*string 1;
}


map $ngxvar2 $myvar2 {
default 0;
~*string 1;
}


--
Igor Sysoev
http://nginx.com

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

map within a map

itpp2012 October 23, 2014 01:17PM

Re: map within a map

Igor Sysoev October 23, 2014 05:02PM

Re: map within a map

itpp2012 October 23, 2014 05:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
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