.htaccess to block direct access to files

  • Thread starter Thread starter THT
  • Start date Start date

THT

THT

Associate
Joined
10 Mar 2004
Posts
998
I want to stop people directly downloading a video from my site.
However, I want it still to be playable from within the HTML5 video player.

I thought I could do this with .htaccess to ensure the referer was from my site, so I did this:

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https://www\.mysite\.com [NC]
RewriteRule \.(m4v)$ - [F,NC,L]

Why isnt this working?
 
Thats not what i want to do though?

Thats allowing a blank referrer which is exactly what I am trying to avoid!
 
Back
Top Bottom