CSS, PHP and ActionScript 3 tutorials
How to block spamm comments in WordPress
1. Activate Akismet
2. Add this in the .htaccess file.
1 2 3 4 5 6 | RewriteEngine On RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} .wp-comments-post\.php* RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L] |
Replace yourblog.com with your blog address.
It block all comments from direct access to wp-comments-post.php.
3. Add this to the .htaccess file also.
Block all spammer IP’s one by one:
1 2 3 4 5 6 7 | <Limit GET POST> order allow,deny deny from 78.133.218.68 deny from 219.159.67.187 deny from 77.41.123.182 allow from all </Limit> |
Just add more IP to this list.
Popularity: 15% [?]
| Print article | This entry was posted by Sorin on 22/04/2009 at 04:06, and is filed under Wordpress. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
