Return to Snippet

Revision: 54289
at December 19, 2011 02:45 by no4h


Initial Code
# 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

Initial URL
http://www.wprecipes.com/reduce-spam-on-your-wordpress-blog-by-using-htaccess

Initial Description
Reduce spam on WP installations (comment spam); this snippet does not look for https referers.

Initial Title
Reduce spam on your WordPress blog by using .htaccess

Initial Tags
wordpress, htaccess

Initial Language
Apache