How to prevent flv hotlinking?
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 An开发者_JAVA技巧ybody 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?
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
精彩评论