当前位置: 首页 > 网络学院 > 网页制作基础教程 > WEB设计综合 > IP阻止

WEB设计综合
使用css让英文文本自动换行
兼容IE6/IE7/FF的页面最小宽度设置

WEB设计综合 中的 IP阻止


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 2169 ::
收藏到网摘: n/a

Want to stop a certain visitor from coming to your site? If you have their IP adress, you can. Copy the code below, and paste into notepad (start>>programs>>accessories>>notepad). Change 00.000.00.00 to the IP address of the person you want to block. Name this file .htaccess and make sure it doesn't have an extension on the end, like .txt. If it is named .htaccess.txt, rename it  .htaccess. Save it and upload it to your main directory. Or, you can upload it as .htaccess.txt, and rename it when it's on your server. If you already have a .htaccess file in your directory, because you have a custom 404 page or something, just put the code beneath whatever you already have. 

你希望阻止一个固定的访问者吗?如果你拥有他的IP地址,那么你就可以做到。复制下面的代码,将它粘贴到记事本中(开始>程序>附件>记事本),将“00.000.00.00改变为你希望阻止的人的IP。将这个文件命名为“.htaccess”,并保证它的扩展名不是以“.txt”结尾。如果扩展名为“.htaccess.txt”,那么请重新命名。如果你的文件夹中已经包含了“.htaccess”文件,那是因为你已经为404错误页面进行了设置,你仅仅只将下面的代码接下去续写即可(该代码写在“.htaccess”文件中)。

deny from 00.000.00.00

评论 (0) All

登陆 | 还没注册?