PDA

View Full Version : How to use htaccess to block request


labguy
10-09-2010, 12:02 PM
Hello,

Does anyone know how to block these type of requests using htaccess?

http://www.mysite.comhttp://gomarketcity.com/cgi-bin/ip.cgi
http://www.mysite.comhttp://gomarketcity.com/cgi-bin/ip.cgi
http://www.mysite.comhttp://makeabank.com/faq.cgi
http://www.mysite.comhttp://proxyjudge1.proxyfire.net/fastenv

Also, is there a specific name for this type of "probing"?

I started by blocking the host, but they keep rotating IP's...futile. My next thought was to block all "*.cgi" requests since I don't use cgi's. Maybe something like this:

RewriteRule .*\.cgi$ - [NC,F]

A better approach would be to detect the appended "http://", but that is where my htaccess abilities stop.

Any ideas would be appreciated.

Jeff