Yesterday whilst travelling up to Leeds on the train (Virgin have nicer trains than GNER by the way) I was listening to the This Week in Tech (or TWiT) podcast. A regular guest to the show is John C. Dvorak who is famous for getting no spam, however he’s clearly been having a problem with comment spam at his blog. Someone at his hosting company has come up with a simple fix for eliminating comment spam generated by bots. It’s so simple in fact, it’s a wonder no-one’s thought of it before.

Clearly this only works for the Apache web server. If you can’t alter Apache’s configuration then you may be able to add the directives into a .htaccess file if your hosting provider allows it.

If you’re running a b2evolution blog, as I am, then you will need to alter the file name in the location tag to something like:

/blog/htsrv/comment_post.php