Custom Anti-Spam mod

I was going to employ a little .htaccess to block certain IPs which are repeat offenders. But, I was afraid that it wouldn’t do enough for me. So, I did a little magic:

ln wp-comments-post.php comments-post.php
cat >> .htaccess
<Files wp-comments-post.php>
Order deny,allow
Deny from all
Allow from none
</Files>
^C

Now, update your theme to submit the comment form to comments-post.php rather than wp-comments-post.php. What’s neat about this hard link, is that it should be un-effected by WordPress upgrades.

If this drastically reduces the spam (which I am currently manually moderating), I’ll remove the moderation queue.

Advertisements

3 Responses to “Custom Anti-Spam mod”

  1. Mark Says:

    I am unsure of the success of this… As I mentioned before, the bulk of my spam is from trackbacks. So, I just added wp-trackback.php to the .htaccess file.

    Looking forward to near-zero spam!

  2. David Says:

    I’ve started getting spam. Let me know what works.

  3. Mark Says:

    I’ll let you know as soon as I find the bes solution.

    I have successfully reduced the number of spam, but not completely nuked them yet. I just now tried this:
    http://codex.wordpress.org/Combating_Comment_Spam/FAQ#I_have_disabled_trackbacks.2C_but_trackbacks_continue_to_be_posted

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: