Tuesday, August 3, 2010

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:

order allow,deny
allow from all
deny from 123.456.789

Replace 123.456.789 with the IP address you want to block.

Post a Comment

Popular Posts