【发布时间】:2014-01-14 04:35:57
【问题描述】:
我正在使用此代码来防止图像热链接
<rule name="Prevent Hotlinking">
<match url=".*\.(jpg|jpeg|png|gif|bmp)$"/>
<conditions>
<add input="{HTTP_REFERER}" pattern="^$" negate="true" />
<add input="{HTTP_REFERER}" pattern="^http://domain\.com/.*$" negate="true" />
</conditions>
<action type="Rewrite" url="/img/hotlink-logo.png" appendQueryString="false" />
</rule>
但是,当我访问 HTTPS 部分时,我的所有图像都被替换为 hotlink-logo.png。我尝试添加第二条规则来管理 hTTPS 请求,但出现了同样的问题。
我尝试为 HTTPS 添加第二个条件,但随后再次允许热链接。
有什么建议吗?谢谢
【问题讨论】:
标签: iis web-config