December 16, 2006

Be Gone

It's a little early to be celebrating, but I seem to have banished referrer spammers from one of my sites. Spam accesses dropped from several hundred a day to none today by making a change in the htaccess script that controls the site:

SetEnvIfNoCase VIA ^.{1,} spammer=yes
SetEnvIfNoCase X-AAAAAAAAAAAA 1 spammer=yes
SetEnvIfNoCase USER_AGENT ^PEAR.* spammer=yes

RewriteEngine on
RewriteCond %{ENV:spammer} yes
RewriteRule ^(.*) %{HTTP_REFERER} [R=301,L]

All the nasty drug, gambling, and insurance refer spams disappeared after I put this in my htaccess.

Of course, it may just mean that this particular spam run has ended and they will be back again.

Posted on December 16, 2006 03:45 PM