September 2005 Archives

Comment Spam blocking

Found the following from Dvorak Uncensored:

Most people who run blogs have issues with comment spam in their blogs and there are all sorts of fixes. Marc Perkel at ctyme.com – my host — was floored, he said, when he realized a simple command to the Apache software would kill most of it — and it does indeed work!

Here is the short code running on the ctyme server for my dvorak.org using WordPress-based blogging software. Altering it for other blog software and other blogs should be simple for anyone running Apache.

<location /blog/wp-comments-newpost.php>
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^.*dvorak.org/.*
    RewriteRule ^.* http://www.ctyme.com/comment-spam.html
</location>

Essentially it makes the basic condition for any post rigid: it has to be coming from a link within the blog itself, the “comment” link. Most spam does not.

My spam count on the blog has dropped from 50-100 to 2 per day without any other tricks.

About this Archive

This page is an archive of entries from September 2005 listed from newest to oldest.

August 2005 is the previous archive.

October 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.