Welcome! Log In Create A New Profile

Advanced

block bot on uri with query_string

ron ramos
July 27, 2013 10:58PM
Hi All,

Been trying to block bots from accessing a URI that has a query_string
"action=get_it", i tried below


location ~* \?(action=get_it)$ {

if ( $http_user_agent ~
(crawl|Googlebot|Slurp|spider|bingbot|tracker|click|parser|spider)) {

return 404;

break;

}

}

i just learned that location does not match query string, if i do the
is_arg i cant do nested if, anyone able to do this before?

TIA.

Regards,

Ron
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

block bot on uri with query_string

ron ramos July 27, 2013 10:58PM

Re: block bot on uri with query_string

edogawaconan July 28, 2013 05:10AM

Re: block bot on uri with query_string

ron ramos July 28, 2013 06:22AM

Re: block bot on uri with query_string

Jonathan Matthews July 28, 2013 08:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 322
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready