hotlink protection doesn't work for all browsers

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
*UPDATE* I've removed all the rewrite section now since it was preventing images from loading even on the main site. I'm not unprotected again. I give up unless someone can write a proper .htaccess for me.




http://www.ovechkinfans.com/vids/goal33.avi

In IE/FF
Left-click that link in IE and it does its job... it redirects which is in the .htaccess code.
Right-click it and you're able to save the avi which is bad... I don't want anyone to be able to save the avi from an outside link (anandtech.com in this case).

In Opera
If you left-click it will redirect.
If you right-click, it will save a default.htm file (which is fine... they can't get to the .avi).

Why is it only working in Opera ?

 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I'm guessing that IE doesn't send a referrer address when doing a right click. I have a potential hack in mind but I'm not sure if it makes enough sense. I'll think about it some more and then see if I can post it. It would basically entail requiring a cookie for the download, which is a little more reliable than referrers.
 

episodic

Lifer
Feb 7, 2004
11,088
2
81
Im able to save the link with firefox easily. MediaPlayerConnectivity Extension - an awesome thing.
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Originally posted by: superjohnyo
maybe try this?

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?ovechkinfans.com(/)?.*$ [NC]
RewriteRule .*\.(avi|gif|jpg)$ http://www.ovechkinfans.com [R,NC]
I tried this and in IE when I right-click the files to save target as (from the main site)... it tries to save as .htm file.