网络学院

w3pop.com :: 网络学院 :: WEB设计综合 :: IP阻止

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

WEB设计综合
HTML基础
连接基础
图像边框
HTML基本原则
基于浏览器类型实..
超链接效果
透明 IFrames
IFrames 简介
开启DW中的无效行..
框架中的“target..
链接效果
定义滚动条样式
指针样式
IP阻止
除去打印脚本
自动刷新、转向
Meta 标签
CSS 常用布局
去掉链接中的下划..
关闭IE中探出的图..

IP阻止


作者:Lindsay Coome 翻译/整理:w3pop.com 发布:2007-05-18 修改:2007-05-22 浏览:11436 :: ::

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

评论 (4) 1 All