Welcome! Log In Create A New Profile

Advanced

Using map module variable being unset with if

June 22, 2011 01:06AM
Hey guys,

I have been trying to use the nginx map module to do some rewrites in bulk, basically my
map looks something like this:

map $request_body $var {
default no;
~.+.string1 dorw;
~.+.string2 dorw;
...
}

in a location i have the following

if ($var = dorw){
rewrite ^ /home last;
}

I also have a log_format which logs the variable state (and it reports correct), however
once I enable that if.. the $var seems to reset to 'no'.

Any ideas? This is kind of confusing.

Thanks and any help is much appreciated.

Lou
Subject Author Posted

Using map module variable being unset with if

kamlou June 22, 2011 01:06AM

Re: Using map module variable being unset with if

Maxim Dounin June 22, 2011 04:50AM

Re: Using map module variable being unset with if

kamlou June 22, 2011 10:35AM

Re: Using map module variable being unset with if

kamlou June 22, 2011 10:51AM

Re: Using map module variable being unset with if

António P. P. Almeida June 22, 2011 10:58AM

Re: Using map module variable being unset with if

Mikhail Mazursky June 22, 2011 11:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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