为了让资源不被缓存,响应头可对【资源目录】增加
重写模块增加指定格式的文件重写功能
<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
标签:cn,IIS10,防盗链,增加,重写,资源 From: https://www.cnblogs.com/blsegirl/p/18258549