if( variable exists )

double nginx-forum at nginx.us
Tue Apr 3 12:35:02 UTC 2012


Hello,

Is there a chance to test if a "$arg_variable" (empty value) exists?
The problem: "if" condition returns "false".

URL:
http://example.com/?variable

nginx.conf:
location / {
if( $arg_variable ) {
rewrite ^.*$ /other-location;
}
}

Thanks a lot
Marcus

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,224860,224860#msg-224860



More information about the nginx mailing list