View Single Post
Old 02-21-2007, 12:17 AM   #1 (permalink)
dynaweb
The Visitor
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
dynaweb is on a distinguished road
Default [How To] Allow / Disallow Directory Browsing

Most servers are configured so that directory browsing is not allowed. This means that if a certain web directory does not contain an index (or default) file, then an error message will be displayed in the web browser.

If Directory Browsing is enabled, then the contents of the directory will be shown in the browser and you can click freely on files and folders therein.

Disllow Directory Browsing
If you want to Disallow Directory Browsing on a server that allows it, create an .htaccess file in the web root directory and add the following line:

Code:
IndexIgnore */*
Allow Directory Browsing
If you want to Allow Directory Browsing on a server that dies nto allow it by default, create an .htaccess file in the web root directory and add the following line:

Code:
Options +Indexes
Remember that .htaccess files do not work on Windows Servers, so you will have to have your web host set the configuration for you. Have fun with your server and htaccess!
dynaweb is offline  
Reply With Quote
The Following User Says Thank You to dynaweb For This Useful Post:
Brook (04-14-2009)