分享

写回答

发帖

[其他] Windows 4GH Deluxe 主机防盗链测试

GoDaddy GoDaddy 1397 人阅读 | 3 人回复

发表于 2011-4-22 09:47:34 | 显示全部楼层 |阅读模式

图片源地址:
http:///www.yilot.com/Pic/201001/s_CLOC000062-1.jpg

本文引用:


实际图片:
001.jpg


-----------------------------
歌曲歌曲源地址:
http:///www.yilot.com/music/song/CN0011.WMA

本文引用:
http:///www.yilot.com/music/song/CN0011.WMA

不知道这里插入歌曲对不对。

回答|共 3 个

lwbo1987

发表于 2011-4-22 10:08:30 | 显示全部楼层

你发的链接打不开! 防盗链测试可以自己测试也行的

yilot

发表于 2011-4-23 14:13:14 | 显示全部楼层

把代码放到这里,免得大家看到这个帖子,找不到代码。上面现实的图片是成功了。

下面是我的防盗代码。
+++++++++++++++++++++
<configuration>
<system.webServer>
    <rewrite>
      <rules>
        <rule name="Prevent hotlinking">
          <match url="^.*\.(rar|zip)$" ignoreCase="true" />
          <conditions>
            <add input="{HTTP_REFERER}" pattern="^$" negate="true" />
            <add input="{HTTP_REFERER}" pattern="http://www.yilot.com/.*" negate="true" />
            <add input="{HTTP_REFERER}" pattern="http://www.ylot.cn/.*" negate="true" />
            <add input="{HTTP_REFERER}" pattern="http://bbs.yilot.com/.*" negate="true" />
          </conditions>
          <action type="Rewrite" url="/offlink.gif" />
        </rule>
      </rules>
    </rewrite>
</system.webServer>
</configuration>

lwbo1987

发表于 2011-4-23 14:18:31 | 显示全部楼层

感谢分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则