Forum Moderators: phranque
Rewriteengine on
RewriteCond %{HTTP_REFERER}!^http://domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.domain.com/.*$ [NC]
RewriteRule \.(wmv)$ - [F]
The problem seems to be that the windows media player is accessing the file from a domain other than mine, its own domain, so I am blocked from getting the file even if coming validly from domain.com... does that make sense? Is there a way around this?
You may want to check your server's logs. When I try accessing files with WMP, it shows no referer. You'll have to add an extra RewriteCond to account for that.
Added:
Now that I've thought about it, mod_rewrite probably isn't the way to tackle this problem. You may want to consider other ways of restricting access to your files. Password protection maybe?