0
votes

I have made a webpage to play some videos using html5 video player. I wouldn't like to allow users to download video files, all videos will be saved in .mp4 extension. Generally users couldn't download but if they have some knowledge about html programming will download easily by browsing the source code and copying the direct video URL. I tried the htaccess code below to prevent video files from being downloaded and it worked also BUT it seems as if it doesn't allow to play even in webpage where I want to play them.

Code I tried

<FilesMatch "\.(mp4)$">
    Order deny,allow
    Deny from all
    Allow from localhost/t/v.php
</FilesMatch>

Here I want to allow to localhost/t/v.php only to access these videos and deny from anything else. But it seems to not be working.

1
Change localhost to 127.0.0.1 and see if that works? (I'm not sure if it matters, though.) - Amal Murali
@AmalMurali I think it does actually. - MisterBla
But after publishing of site ? - user3603684

1 Answers

0
votes

Change the order. Order allow,deny will process first the allow directive, then the deny one.