blocking bad bots with htaccess
Posted by: depth
Posted on: 2009-03-23 13:25:00
i've been getting files leeched by dizzler.com, and found a way to block their spider and others by editing .htaccess:
http://www.evolt.org/article/Using_Apache_to_stop_bad_robots/18/15126/
from here:
http://stackoverflow.com/questions/81238/how-can-i-block-mp3-crawlers-from-my-website-under-apache
i tried using the bad_bot environment variable, and also tried just using dizzler's IP directly, but both created 500 errors on all pages in subdirectories of my .htaccess file. it think it's because i'm not correctly specifying paths in my Directory directives.
i wrote this:
<Directory "/mymusicdirectory/">
Order Allow,Deny
Allow from all
Deny from 66.232.150.219
</Directory>
and put that in an .htaccess file in the parent directory of mymusicdirectory. i tried the same with the environment variable method as well; both cause 500s. can someone please clarify how to specify paths in this context? the directory i put this .htaccess file in is /mysite.com/.
my ftp client (Transmit) doesn't display paths above the parent of mysite.com, so i'm not sure if i'm missing something like /home/users/ or anything.
in case you hadn't noticed, i'm a noob with server config stuff, so please go easy :)
thanks!