Question on Rewrite / If statements

Resicow resicow at
Thu Sep 17 05:03:26 MSD 2009


I have learned that the http_referer module does *not* support variables.

I am trying to work around this with if / rewrite statements, but may 
have run into the same issue.

How can I make this work?

set $myvar;
if ($http_referer ~* $myvar) {
do something

When I run that, it always returns false. However this works:

if ($http_referer ~* {
do something

It appears that the if statement doesn't evaluate the variable. Is there 
anyway around this?



More information about the nginx mailing list