Answer the question
In order to leave comments, you need to log in
How to protect a file from being opened via a direct link?
Hello, this question has already been asked many times, but I could not find a solution.
In general, I have a video directory, and video files are stored in it accordingly. I display the videos themselves to users in an iframe, where src = 'video/filename.mp4' . Only authorized users can see the video. However, if you follow the direct link site.ru/video/filename.mp4, the file will open for hello.
I tried using .htaccess , I wrote the following:
Deny from all
Then the error in the iframe is that access is denied.
I'm running the site on a local server.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question