Feb 4 2005 @ 21:20:23

htaccess rules that leave referrer spammers feeling left out - BOO F-ING HOO!

(0)
0
A few .htaccess rules I use to block out referrer spammers.

# set all nasty referrer spam domains to "banned" status
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?psxtreme\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?freakycheats\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?fidelityfunding\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?formula42\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?chat-nett\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?terashells\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?learnhowtoplay\.(.*)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)?tecrep\.(.*)" banned
#....etc..etc...etc...

#Deny access to all with status "banned"
Order Deny,Allow
Deny from env=banned

#ban an IP in a referrer
RewriteCond %{HTTP_REFERER} ^(http://)?12\.163\.72\.13.*$
RewriteRule .* - [F,L]

#Deny access to certain IPs
Deny from 12.175.0.44
Deny from 199.237.51.97
Deny from 65.110.35.60


(The full list of rules is of course much longer)

Deal with it scums...

BTW, yes, it is actually spelled "referrer". According to Dictionary.com, "referer" is a misspelling of "referrer" which somehow made it into the HTTP standard. A given web page's referer is the URL of whatever web page contains the link that the user followed to the current page. Most browsers pass this information as part of a request.

PS: You must be at least this tall to view this blog correctly.

Update: A much better way to get rid of BlogSpam using XMLHTTPRequest:
/story331/

Comment on this