Welcome! Log In Create A New Profile

Advanced

Filter characters in URLs

Posted by bmumph 
Filter characters in URLs
February 24, 2010 06:35PM
OK so I've blocked a bunch of file type requests by putting this in my conf
[code]
location ~* \.(exe|com|dll|conf|log|htr|cer|cdx|bat|cmd|mdb|php|asp|aspx|zip|rar|cfg|dbf|udl|old|bak)$ {
break;
return 444;
}
[/code]

But what is the syntax if I want to block any URL requests with certain characters, such as @ and ! etc etc.??

Thanks very much.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
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