Upgrading to WordPress 3.2.1 and Disabling Bad Behavior

I’ve upgraded to WordPress 3.2.1 the latest bugfix to WordPress 3.2.x line which seems to improve the perfomance of the admin panel noticeably, probably due to the updated database scheme.

I’ve also decided to disable Bad Behavior plugin in my site, which was supposed to block most spammers, but since the rate of spams that I’ve received has been dropping for months and it did block some of the web surfers who surfed from large organizations (probably through proxies). So, dropping it entirely won’t hurt.

Hopefully this will make my posts more accessible to others, easily.

Using Apache mod_security and .htaccess to block comment spam on the web

Comment spam is the most annoying thing to web operators. Besides eating up bandwidth, comment spam can pollute web discussions area and which gives bad impression to visitors.

Apache HTTPD mod_security module can be configured to reduce web spam by filtering common keyword, content and referrer used by spam bots around the internet.

Here’s an example of .htaccess file to block common comment spam :

<IfModule mod_security.c>
SecFilterEngine On
SecFilterScanPOST On
SecFilterDefaultAction "deny,nolog,auditlog,status:503"
SecFilterSelective POST_PAYLOAD "(mortgage|viagra|poker|traffic|discount|medical|casino|lyrics|loan)"

</IfModule>

Please ensure that your Apache installation has mod_security module enabled. The method is suitable to be used on websites that receive a lot of user comments like forums, blogs (including WordPress and Drupal) and photo gallery.

Note: This is not a full-proof solution as it depends on the use of keywords.