If( variable exists )

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:

On Tuesday 03 April 2012 16:35:02 double wrote:

Hello,

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

URL:
Example Domain

if ($args ~ variable) {

}

wbr, Valentin V. Bartenev