anyone can help me to combine these 2 lines?

Joshua Jonah josh at collabrestate.com
Mon May 17 01:35:31 MSD 2010


Try this:

if ($http_user_agent ~ "^(AAA|BBB|^.+)$") {return 400;}


On 16/05/10 4:40 PM, kamanwu wrote:
> I just want to set.......if $http_user_agent equals AAA or BBB or empty ("").....then return 400...Thanks.......
>
>
>
>      if ($http_user_agent ~ (AAA|BBB)) {return 400;}
>      if ($http_user_agent = "") {return 400;}
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,87266,87266#msg-87266
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>    




More information about the nginx mailing list