How To Redirect The Spammers Where You Want To?

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 plugins. The best way to bounce them back or on another page, wherever you want to, is simply by editing your .htaccess file.

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_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.** [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule ^(.*)$ ^$ [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.

!.** = Change it with your domain name


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

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

After setting up these lines of codes in your .htaccess file you immediately eliminate a large portion of blog spam.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like