using two if statements together in nginx conf

Roxis roxis at list.ru
Wed Feb 28 05:00:39 MSK 2007


On Wednesday 28 February 2007, Andy Triboletti wrote:
> location = /things {
>     if ($http_referer ~* ".*bob.com.*" && $args ~* "12345")    {
>         rewrite ^/things$ /thing.disabled break;
>
>     }

this should work:

if ($http_referer !~* ".*bob.com.*") {
    break;
}

if ($args ~* "12345") {
    rewrite ^/things$ /thing.disabled break;
}





More information about the nginx mailing list