MRKAVANA (mrkavana@gmail.com) - www.facebook.com/kavanathai

Aug 25, 2011

Howto: Disable Directory Listing on WebServer


How to Disable Directory Listing? You may want to hide directory listings because by default Webservers look for an index file under every directory and if not found, they list the files and directories under it on browsing the directory.
To disable Directory Listing for an account recursively:
1) Create a .htaccess file under the directory
vi .htaccess
2) Add Options directive as follows:
Options -Indexes
3) Save the file.
You now will see a Forbidden message on accessing a directory that do not include an index file.

No comments:

Post a Comment