I have several .pdb files, which should be viewed in my website by clicking a link on a page. But when a pdf file opens, in the address bar it is visible the directory where all .pdf files reside. SO if the user will write in address bar http://mySite.com/myDir he will see and be able to download all files at once. But I don't want! When I [chmod 644 myDir], the files become not visible even for my site - i.e. you can not open them by clicking the link I have mentioned. How to solve this problem?
Tell me more
×
Webmasters Stack Exchange is a question and answer site for
pro webmasters. It's 100% free, no registration required.
|
Using .htaccess you can block it like this:
If you want to prevent users from being able to access those files without first being authenticated see this answer. |
|||
|
|
|
You should disallow directory browsing. There are a few ways you could to that, depending upon what sort of access you have to the server, but using htaccess is the simplest. |
|||
|
|
|
Create an empty file named 'index.html' in your |
|||
|
|