Prevent Apache listing directory contents

Add a file called .htaccess to the directory that contains the following:

IndexIgnore *
   

The * is a wildcard that matches all files. E.g. You could use *.jpg to hide only the JPG files (with a .jpg extension). The list of files to ignore should be space seperated.

Last modified: 07/05/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

Go to top

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top