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.
Leave a Reply
You must be logged in to post a comment.