Posted By

no4h on 12/19/11


Tagged

wordpress htaccess


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Kurt


Reduce spam on your WordPress blog by using .htaccess


 / Published in: Apache
 

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

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

  1. # BEGIN die spam die
  2.  
  3. <IfModule mod_rewrite.c>
  4. RewriteEngine On
  5. RewriteCond %{REQUEST_METHOD} POST
  6. RewriteCond %{REQUEST_URI} .wp-comments-post.php*
  7. RewriteCond %{HTTP_REFERER} !.*yourdomainname.* [OR]
  8. RewriteCond %{HTTP_USER_AGENT} ^$
  9. RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
  10. </IfModule>
  11.  
  12. # END die spam die

Report this snippet  

You need to login to post a comment.