1

On my server (over which I have little control), directories are listed by default, so for mysite.com/images I get:

Index of /images

Parent Directory
BirdsAreHere.png
CanYouSpot-AdBlank.jpg

etc. Is putting an index.html in that directory enough to prevent people listing the files, or is there still a way of getting at that list? Is it the same for my web root directory (mysite.com)?

4

Putting an index.html file should solve that problem. But if you really want to be sure no one gets the directory list just place an .htaccess file in the root of your www directory with this line in it:

Options -Indexes

That will prevent Apache from listing the files of your directories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.