Page 1 of 1

Play file, prevent direct access, prevent downloading

Posted: 26 Jul 2011, 14:04
by p4trick
Hi,

I am facing a problem with the access of files and I hope anyone is able to help me solving the problem.

What I want to do: Play flv-files with the built-in "Play-option". It should only be visible to a certain group of users and it should not be possible to download the video.

I read this article to achieve the goal --> the video files are located outside of the public webserver directory.

Problem 1: if the file is outside of the public webserver's directory, it cannot be played :(

Problem 2: if I would move it to the inside of the webservers directory, I would need other meachanisms to prevent downloading the video with the complete URL --> e.g. .htaccess and this would pop up an ugly auth-window, which I don't want.

I hope someone got an idea about that.

Thx in advance,
p4trick

[!! SOLVED !!]

Posted: 26 Jul 2011, 15:33
by p4trick
I solved it!

This code within the .htaccess file prevents users from accessing flv-files directly, but the video can be shown to registered users by using PD-settings.

Code: Select all

<FilesMatch "\.(flv)$">
     SetHandler application/x-httpd-php
</FilesMatch>
Greetz,
p4trick

Re: Play file, prevent direct access, prevent downloading

Posted: 27 Jul 2011, 00:11
by Jan
Ok