View Full Version : Eliminate Directory Listings with Apache
thekevin07
09-23-2007, 12:47 PM
HI
Does anyone know how to prevent users from seeing a file list of a directory that doesnt have a index file in it? Im using apache 2.
Thanks
create a .htaccess file and place it in the root directory of your website...so that all sub-directories would inherit this functionality.
add the following line (inside .htaccess file) to prevent directory listings of all files and dirs.
IndexIgnore *
Or, you can turn directory listing off all together by adding this line
Options -Indexes
cheers,
~E
thekevin07
09-23-2007, 01:36 PM
thank you
oracleguy
09-23-2007, 05:49 PM
Also if you actually have control over the server and wish for directory listings to be disabled all the time, you can use the Options directive where you declared the site in your apache configuration file.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.