This addition to my .htaccess file has really reduced the amount of referer log spam I've been receiving, and as a bonus it also cuts down on comment spam (though I'm happily free of that thanks to MT-Blacklist, the .htaccess trick eliminates the bandwidth toll they can take).
It took some trial and error to figure out how to make this play well with the Movable Type-generated content that was already in my .htaccess file, since I've never ever monkeyed with this stuff before. The trick was to put these new instructions at the top of the file, above the MT content, and then to remove the "RewriteEngine on" line from the MT section. Otherwise the two identical lines cause a server misconfiguration error page.
Yes, this kind of inelegant method of blocking spam is inefficient and not 100% effective, but I'm seeing happy little 403 'denied' errors in my 'recent visitors' page from all the spamming domains, while legitimate traffic seems to be coming through just fine.
umm, where can one find the .access file?
i don't see in in the root directory....
January 24, 2005 10:20 PM