I have created a web applicaiton/site where people are required to log and are able to access some files to view (PDFs).
My issue is I as I am storing these files on the server, in a documentation folder people can access the files directly without having to log in (if they know the random url for example www.example.com/documentation/example1.pdf).
I am using sessions to control if they are logged in or not, but how can i prevent direct access to people just hotlinking the direct link if they are not logged in or have an open session?
If i set the permissons via filezilla, it restricts all access regardless if they are logged in or not.
Can anyone provide advice on a solution I could take for this?
Thanks