Banning Bad Bots
Join the DZone community and get the full member experience.Join For Free
The following code is the contents of /banme/index.php. This file is linked to from my main website but invisible to web browsers and disallowed in robots.txt. Therefore, only bad bots will ever follow this link and when they do so they will get banned in .htaccess and their ip address will be emailed to firstname.lastname@example.org.