...

View Full Version : Hotlink Protection does NOT work in IE (works in Firefox)



trancedm
11-22-2005, 04:24 AM
hello CF,

i want to disallow hotlinking to a specific websites only, so basically i will hotlinking to all websites except for the URL www.site1.tld, www.site2.tld, www.site3.tld etc.

i had this code below for about a week, i thought it worked perfect but to my surprise i realize that it only works in Firefox and not IE, i just noticed this today, i was at work and was browsing (using IE) a few sites that's hotlinking to my swf files, i noticed that all of my swf files loads properly on their websites which werent supposed to because i used the code below to disallow hotlinking to this websites



RewriteEngine On
RewriteCond %{HTTP_REFERER} site1.tld [OR,NC]
RewriteCond %{HTTP_REFERER} site2.tld [OR,NC]
RewriteCond %{HTTP_REFERER} site3.tld [NC]
RewriteRule \.(jpg|jpeg|swf)$ - [NC,F]


now when i got back home i visited those sites that are hotlinking to my swf files using firefox and my swf files was not loading, i then tested it using IE and swf files was loading properly...

so basically my hotlink protection only works in firefox and not IE, i cleared my IE cache so its not getting those files from the temp folder

is there anyone outthere know what's going on here or could correct my code above?

any help will be appreciated, thanks

_Aerospace_Eng_
11-22-2005, 05:31 AM
Try

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site3\.tld [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site2\.tld [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site3\.tld [NC]
RewriteRule .*\.(jpg|jpeg|swf)$ - [NC,F,L]
The above was modified from a hotlinking script someone else gave me.

trancedm
11-22-2005, 02:06 PM
_Aerospace_Eng_ thanks for the reply, i tested out your code but i believe your code prevent hotlinking to all websites except for the URL your specify in the "RewriteCond" i want to do the opposite

i may post an example later for better understanding

thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum