/ Published in: Apache
Reduce spam on WP installations (comment spam); this snippet does not look for https referers.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# BEGIN die spam die <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} .wp-comments-post.php* RewriteCond %{HTTP_REFERER} !.*yourdomainname.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L] </IfModule> # END die spam die
URL: http://www.wprecipes.com/reduce-spam-on-your-wordpress-blog-by-using-htaccess