IIS10 资源增加防盗链

 

 

为了让资源不被缓存,响应头可对【资源目录】增加

 

重写模块增加指定格式的文件重写功能

<system.webServer>

<rewrite>

<rules>

<rule name="Prevent hotlinking"> <match url="^.*\.(rar|zip)$" ignoreCase="true" />

<conditions>

<add input="{HTTP_REFERER}" pattern="http://www.fuqi800.com/.*" negate="true" />

<add input="{HTTP_REFERER}" pattern="http://sims.fuqi800.com/.*" negate="true" />

<add input="{HTTP_REFERER}" pattern="http://www.hudie.la/.*" negate="true" />

</conditions> <action type="Rewrite" url="/404.htm" />

</rule>

</rules>

</rewrite>

</system.webServer>

 

参考地址:cloud.tencent.cn/developer/article/2108259

posted @ 2024-06-20 14:04  blsegirl  阅读(8)  评论(0编辑  收藏  举报