如何防止flv盗链?
我正在从 s3 位置加载 flv 文件。我想防止它的热链接。 crossdomain.xml 似乎不适用于 flvs 有人知道为什么 crossdmain 不起作用吗?我们可以通过哪些方法来阻止其他 Flash 容器从我们的位置提取内容?
I am loading an flv file from an s3 location. I want to prevent its hotlinking.
crossdomain.xml does not seem to work for flvs
Anybody has nay idea, why crossdmain does not work? and what are the ways we can prevent other flash containers to extract the content from our location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新:
啊,Google 再次来救援,S3 存储桶,这是 Amazon 的权利:
“如何防止网站热链接
与 Apache 服务器不同,在 Apache 服务器中,您可以通过一些 .htaccess 规则来防止其他网站热链接到您的图像,这样的功能不是 因此,处理S3
是向其他网站的所有者发送电子邮件,或者只是将图像移动到其他位置并更新您自己网页中的超链接。
上的热链接的最佳方法 还想探索使用签名 URL(请参阅提示 #2)——这些是临时链接,会在给定时间后自动过期(类似于rapidshare),但如果您托管可下载的图像,这可能不是正确的做法。视频、电子书或 MP3 等文件、限时 URL 可能是 S3 上的一个不错的选择。”
http://www.labnol.org/internet/amazon-s3-hotlinking /9186/
也许这会有所帮助。
我没有测试它是否有效,但也许会有帮助。如果您有 Apache 服务器,请使用以下内容编辑 .htaccess 文件:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://([-a-z0 -9]+.)?yourwebsite.com [NC]
RewriteRule .(wmv|flv)$ - [F,NC,L]
只需将您的网站更改为您的网站即可。 (应该是 RewriteEngine 开启后的三行,不确定是否重要)
我发现在这个网址:underscorebleach.net/jotsheet/2004/06/htaccess-prevent-hotlinking
Update:
Ah, Google to the rescue again, S3 bucket, that's Amazon right:
"How to Prevent Sites from Hotlinking
Unlike the Apache server where you can prevent other sites from hotlinking to your images through some .htaccess rules, such a feature in not available in S3.
Therefore the best way to deal with hotlinking on S3 is to send an email to the owner of the other site or simply move your images to another location and update the hyperlinks in your own web pages.
The other approach that you may also want to explore useses Signed URLs (see tip #2) -- these are temporary links that automatically expire after a given time (similar to rapidshare). It may not be the right thing to do for static images but if you are hosting downloadable files like videos, ebooks or MP3s, time limited URLs could be a good option on S3."
http://www.labnol.org/internet/amazon-s3-hotlinking/9186/
Maybe that will help.
I didn't test this to see if it worked but maybe it will help. If you have a Apache server, edit your .htaccess file with something like:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+.)?yourwebsite.com [NC]
RewriteRule .(wmv|flv)$ - [F,NC,L]
Just change yourwebsite to your website. (Should be three lines after RewriteEngine on, not sure if it matters)
I found that at this url: underscorebleach.net/jotsheet/2004/06/htaccess-prevent-hotlinking