且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何prevent FLV盗链?

更新时间:2022-11-06 18:08:58

更​​新:

嗯,谷歌再次抢救,S3桶,这是亚马逊正确的:

Ah, Google to the rescue again, S3 bucket, that's Amazon right:

如何起价盗链p $ pvent网站

"How to Prevent Sites from Hotlinking

与Apache服务器,你可以从$通过一些规则的.htaccess盗链到您的图片,在无法使用这样的功能在S3 p $ pvent其他网站。

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.

因此​​,处理盗链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.

另一种方法,你可能还需要探索useses签名网址(见提示#2) - 这些都是暂时的链接,一个给定的时间(类似于RapidShare的)后自动失效。它可能不是正确的事情做静态图像,但如果你正在主持喜欢的视频,电子书或MP3音乐下载的文件,时间限制的URL可能是在S3上一个不错的选择。

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 /

也许这将有所帮助。

我没有测试,看看它是否工作,但也许它会有所帮助。如果你有一个Apache服务器,编辑您的.htaccess文件是这样的:

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叙述上 的RewriteCond%{HTTP_REFERER} ^ HTTP://([-a-Z0-9] +)yourwebsite.com [NC] 。重写规则(WMV | FLV)$ - [F,NC,L]

RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+.)?yourwebsite.com [NC] RewriteRule .(wmv|flv)$ - [F,NC,L]

只是yourwebsite改变到你的网站。 (应该是RewriteEngine叙述后三条线,不知道它的问题)

Just change yourwebsite to your website. (Should be three lines after RewriteEngine on, not sure if it matters)

我发现,这个网址:underscorebleach.net/jotsheet/2004/06/htaccess-$p$pvent-hotlinking~~V

I found that at this url: underscorebleach.net/jotsheet/2004/06/htaccess-prevent-hotlinking