Feb 08 2005
Better Spam Blocking
I’m upping the ante on Comment Spammers.
I’ve ben reading through the documentation for Apache and have come up with a better (I think) approach at blocking comment spammers. It may result in a few more people incorrectly receiving ASBOs but until I receive a complaint about it my new system ius staying in place.
The new system uses apaches mod_access and mod_setenvif to check if a referer has been set and block it if it conforms to a Regular Expression. The code that I have got in my .htaccess file is as follows:
SetEnvIf Referer ((holdem|texas|poker|casino|online|gambl|blackjack|game|free).*){2,} deny_me
Deny from env=deny_me
This is only a first version Regex and will probably need to be changed at some point, but it will do for now.