Forum Moderators: phranque

Message Too Old, No Replies

Any way to block requests for a bad page

and add to the ip ban list

         

eljefe3

4:59 am on Aug 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got a few clowns who run scrapers to my site that call a page that doesn't exist. They call www.mysite.com408 where they are requesting 408 ( not /408 ) from proxies. What I'd like to be able to do is block any of these bots/scripts and add them to my ip list automatically. Any simple solutions to this one?

jdMorgan

1:00 pm on Aug 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you running key_master's bad-bot script [webmasterworld.com]?

If so, something like this should work:


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ [^/]
RewriteRule . /cgi-bin/bad-bot.pl [L]

This detects a missing leading slash on the requested URL-path, and rewrites to the IP-banning script.

Jim