I know many bloggers hate spammer who put junk messages on your blog's comment. I think people know how to block spam messages, basically that use black lists to block visitor's IP address. But it has a problem: spammer can change his IP address. How can you block it? There has a simple way to block visitors from a country, you can use .htaccess or hypertext access file to do that. You can reate a .htaccess file. How to create it?
* Create a text file on your PC and name it htaccess.txt
* Upload it to the root of your hosting account. In most cases, put it in the folder which has the folders by the name of public_html, private_html etc
* Then using a FTP client or the File Manager of your host, rename the file to .htaccess. Ensure that the file name is dot htaccess (don’t forget the dot)
If you want block a country, the simple way is use Block A Country, that can help you make block list to your .htaccess file. Simple pick a country from list, then get the .htaccess details for that country, copy it and paste it in your .htaccess file. So all visitors from the country will not be allowed to enter your site.
我知道很多blogger痛恨spammer,他们总是在网站上发布垃圾信息。我想人们知道如何禁止spam,基本上是使用黑名单来禁止垃圾信息,这个名单则是spammer的IP地址。但这也有一个问题,spammer可以更换IP地址。如何能锁住他们?这里有一个比较简单的方法来锁住一个国家,你可以使用.htaccess 或hypertext文件来达到这一步。你可以建立一个.htaccess文件。如何建立.htaccess文件?
* 在你的电脑中创建一个txt文件并命名它为htaccess.txt
* 上传它到你网站的根目录中,大多数情况下是在一个文件夹中有public_html, private_html等等这样的网页
* 然后用你的FTP客户端来更改文件为.htaccess,不要忘记是“(点)htaccess”
如果你想锁住一个国家,可以简单地使用Block A Country来创建.htaccess文件。简单地从列表中选择一个国家,然后获得一个详细锁住该国家的.htaccess文件,将它直接拷贝和粘贴到你的.htaccess文件中。这样所有来自这个国家的访问者都会被禁止访问你的网站。
Block Unwanted Traffic By Country
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment