.htaccess to block reffer spam help

Kelowna

WTF Sleepy Joe... Wake Up
Jul 5, 2011
1,380
16
0
Kelowna, BC
Hi,

I am getting more and more junk filling up my log file on several sites. This seems to be spreading to more of the sites we maintain every week and I was wondering if there is a .htaccess guru on here that can help up out.

This is a sample of the refferer string in my log file...

194.11.16.144/?xurl=http://194.11.16.144/QKg4oO5x763xDjS65dd3625e501fe0a7dcd6036076ea306916k&xref=http://mysite.com

I am not sure what they are after but they always come from a different ip/location so some sort of random proxy list is being used so we can not block them by ip.

This is what we put in the .htaccess file but they still get through...


# set the spam_ref variable

SetEnvIfNoCase Referer "^ 194.11.16.144" spam_ref=1

SetEnvIfNoCase Referer "^ 195.3.145.254" spam_ref=1

SetEnvIfNoCase Referer "^ 194.11.16.141" spam_ref=1



# block all referres that have spam_ref set
<FilesMatch "(.*)">
Order Allow,Deny
Allow from all
Deny from env=spam_ref
</FilesMatch>

Does anyone know how to block this junk? Or do you know what they may be after?