English
 电子信箱
 加入收藏

  威盾防火墙 >> 新闻中心 >> 业界动态 >> IIS7.5 web.config Rewrite Rules 防盗链

 

IIS7.5 web.config Rewrite Rules 防盗链

威盾防火墙 2014-12-25

 

在web.config中加入rewrite规则

格式如下:

<system.webServer> 		 <security> 		  <requestFiltering allowDoubleEscaping="true"></requestFiltering>       		</security>         <directoryBrowse enabled="false" />         <defaultDocument>             <files>                 <clear />                 <add value="index.htm" />                 <add value="index.html" />                 <add value="iisstart.htm" />             </files>         </defaultDocument> 		<rewrite> 			<rules> 				<rule name="Forbid image"> 				<match url="^.*comicdata.*.(txt|doc|gif|jpg|jpeg|png|mp3|flv|swf)$" ignoreCase="true" /> 				<conditions> 				<add input="{HTTP_REFERER}" pattern="^http://(www.)?yzmanga.com/.*$" negate="true" /> 				<add input="{REMOTE_ADDR}" pattern="221.232.16.*" negate="true" /> 				</conditions> 				<action type="Rewrite" url="/static/image/common/logo.png" /> 				</rule> 			</rules> 		</rewrite>     </system.webServer>

相关内容: 最新内容:
IIS网站防盗链下载的解决方案[2014-12-25]
突破防盗链访问WEBSHELL[2014-12-23]
用防盗链系统修复IIS6.0解析漏洞的技巧[2014-12-23]
IIS下Rewrite组件防盗链 图文教程[2014-12-23]
【防盗链】浅谈网站防盗链技术[2014-12-23]
IIS防盗链 ISAPI Rewrite图片防盗链规则写法[2014-12-23]
IIS网站防盗链下载的解决方案[2014-12-25]
GreenSQL助力防止SQL注入攻击[2014-12-24]
教你学会检查SQL注入式攻击漏洞[2014-12-24]
把电脑变成无线路由器的小技巧[2014-12-24]
windows服务器需要注意的安全问题[2014-12-24]
教你使用IDS技术 防止SQL注入攻击[2014-12-24]