简体   繁体   English

IIS / Helicon ISAPI重写热链接保护

[英]IIS / Helicon ISAPI Rewrite Hotlinking Protection

I am using a shared hosting package with ISAPI Rewrite 3 installed. 我正在使用安装了ISAPI Rewrite 3的共享托管程序包。 The problem is that when I try to amend the .htaccess to prevent hotlinking, it doesn't work. 问题是,当我尝试修改.htaccess以防止进行热链接时,它不起作用。 Does anyone have experience of ISAPI Rewrite that can shed light on what I'm doing wrong. 有没有人有过ISAPI Rewrite的经验,可以揭示我做错了什么。 I put the file is put into the same directory as Default.aspx. 我把文件放到与Default.aspx相同的目录中。 The .htaccess is :- .htaccess是:-

[ISAPI_Rewrite]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.co.uk [NC]
RewriteRule \.(jpg|jpeg|gif)$ - [NC,F,L]

Is the syntax right or something else is the case? 语法正确吗?还是其他情况? As always, your help is appreciated. 与往常一样,我们感谢您的帮助。

Try to add "RewriteBase /", but everything else looks good. 尝试添加“ RewriteBase /”,但其他一切看起来都不错。 It could be smth in your permissions. 您的权限可能有误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM