Results 1 to 20 of 20
Jan 8, 2013, 07:11 #1
- Join Date
- Mar 2009
- Melbourne, AU
- 456 Post(s)
- 8 Thread(s)
Restrict access to files from a certain page/directory?
Couldn't quite find a specific answer to this. Imagine a web page that has links to some PDF files: mysite.com/folder/page-with-links.html. The files that are linked to are in a directory at mysite.com/files/.
Is it possible—via .htaccess—to prevent anyone viewing files in the file directory unless they do so by clicking a link on the page-with-links.html page? (For example, is there a way to prevent someone accessing a file by entering a URL in their browser like mysite.com/files/file1.pdf?)
Or perhaps there's a better way. A client has a member-only section of their site that links to sensitive files, and I'm trying to make sure a non-member (such as Google) can't get hold of a file URL and use it to access files stored in publicly accessible directories.