Pages

Thursday, May 5, 2011

Prevent Spam by Blocking IP Addresses


Sometimes there comes a person or bot which constantly spams your blog. To block that person or that bot you can use following hack. You can simply block his IP and he will be never able to visit your site again.
Note: Do take backup of your .htaccess file before you try this.
Place below code in your .htaccess file:
<Limit GET POST PUT>
order allow,deny
allow from all
deny from 123.456.789
</LIMIT>
Replace 123.456.789 with the IP address you want to block.



0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.