Home |   Community News |   Submit WP Powered Site |   WP Powered Sites Gallery
 
 
 
 

How to redirect the spammers where you want

WordPress is my favorite platform for blogging as well spambots love to target WordPress’ comment script directly by using automatic commenting plug-ins.  There is best way to bounce them back or on an other page, where ever you want to simply by editing your .htaccess file.

How to redirect the spammers where you want

Here is the script to add to your WordPress blogs (or into your site’s) .htaccess file:

# block comment spam by denying access to no-referrer requests
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*wparena.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule ^(.*)$ ^http://the-site-where-you-want-to-send-spammers.com/$ [R=301,L]

You need to  change the following lines according to your specific setup:

.wp-comments-post\.php*  = Default for WordPress User

If you are not using WordPress,  add the file name which you are using for comments.

!.*wparena.com.* = Change it with your own domain name

^http://the-site-where-you-want-to-send-spammers.com/$

Enter your least favorite website address here. If you want bounce them back where they are coming from than simply replace the above line with this:

RewriteRule ^(.*)$ ^http://%{REMOTE_ADDR}/$ [R=301,L]

After setting up these line of codes in your .htaccess file you immediately eliminate a large portion of blog spam. For more information on this technique, check out the Perishable Press article at:

Block Spam by Denying Access to No-Referrer Requests

7 Tools For Fighting Spam In WordPress

Image: http://www.orangesoda.com/blog/end-spam-forever-heres-how/

Like this post? Share it!

  • Tweet
  • Facebook
  • Diggit
  • Delicious
  • Reddit
  • StumbleUpon

Related Posts

Rss Feeds   Twitter Followers Email Updates



Community News

Submit More

Popular Posts