I am trying to restrict direct access to files in a directory. So for example i have website.com/files/example.flv.
So if users go straight to the file in the URL, i want them to be redirected to the home page.
I have tried the following using htaccess
deny from all
but its not working great. Is there a way i could do this using php, then in the user goes straight to the file in the url, they will get redirected.
So if the user goes to the file link in the url, they will be sent to the home page. So can this only be done using htaccess