Forum Moderators: phranque
Here's my problem:
I am using rewrite rules to protect my media, not only from being used by other domains, but also from being accessed directly from the browser via a user figuring out the correct URL. Therefore I do not allow blank referers.
Here is the rule I am using (with a real IP and domain name, of course):
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^http://?1.1.1.1(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mydomain.com(/)?.*$ [NC]
RewriteRule .*\.(gif¦jpg¦jpeg¦bmp¦wmv¦mov)$ - [F,NC]
This works great until a page on my site attempts to view a wmv using the embedded active-x Media Player... it complains that it cannot find the file - which means that the rewrite rule is blocking it.
However, gif and jpg, etc work fine.
I guess the problem may have something to do with the media player having a blank referrer?
Can someone help me grant legitimate access to my wmv content, while disallowing people from hotlinking it, or getting to it directly via the url?