Redirect an entire directory
-
nunonog
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 10
-
Thank you received: 0
-
-
11 years 8 months ago #739
by nunonog
Hello,
I have some videos in a directory that are supposed to be accessible to certain users only.
However, it is possible to see the videos typing the URLs directly in the browser...
Is it possible to redirect the whole directory to somewhere else (home page for example) while keeping the videos visible from the player (that is in the article view)?
Thank you very much for any help!
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 8 months ago #740
by admin
Hi,
this can be done but neither with ReDJ not with a redirect.
A similar tecnique is used to prevent "image hot linking", and is based to drop any direct request to an asset (i.e. image) that have no referrer in the request header.
In case of videos is a little bit more difficult cause requests to authorize comes from the player...
As far as I know (but I'm not so expert in this field) there's no easy way, infact you can intercept and download even YouTube videos
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
nunonog
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 10
-
Thank you received: 0
-
-
11 years 8 months ago #743
by nunonog
Hello,
Thank you for your explanation, anyway.
I'll search for a solution somehow.
Another idea would be to save the videos outside public_html. The only questions is how to call those viedos from the player. Do you have any ideas?
Thanks!
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 8 months ago #744
by admin
Yes,
usually putting documents outside the web root allows to increase security. But this requires that the access to these assets is provided through a script (e.g. cgi, pgp, etc.) that checks the request, builds the response header, and then streams the asset to the client.
In your case this script should stream the video file. To have an idea, I mean something like this:
www.webresourcesdepot.com/php-http-streaming-xmoovstream-server/
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
Time to create page: 0.169 seconds