Is there a way to use 2 if statements together either nested or in one line in the nginx config? Here is what I want to do<br><br>For a given location /things I want to check if a query parameter has a certain value, and I also want to check the referer and if both match then do a redirect
<br><br>I tried doing this and a few other things but couldn't figure out how to chain multiple if statements together.<br>location = /things {<br> if ($http_referer ~* ".*bob.com.*" && $args ~* "12345") {
<br> rewrite ^/things$ /thing.disabled break;<br> <br> }<br><br><br>So if someone coming from <a href="http://bob.com">bob.com</a> requests things?thing_id=12345 I want to send them to a disabled page. I tried checking for the query parameters in the location definition block but it didn't have the parameters.
<br>