Last active
December 16, 2015 14:39
-
-
Save fdb713/06d1d5b5e98a70939eb6 to your computer and use it in GitHub Desktop.
nginx if two condition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($request_uri ~ "\.htm") | |
{ | |
set $my_cond P; | |
} | |
if ($args){ | |
set $my_cond "${my_cond}C"; | |
} | |
if ($my_cond = PC) | |
{ | |
return 403; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment