Knowledgebase
Directory Browsing
Posted by Rick G. on 03 May 2015 10:09 AM

To prevent directory browsing on your website just add this line to your .htacess file.

Options -Indexes

There may be all sorts of reasons you want directory browsing enabled. But, to disable it just add the above line to the public_html/.haccess file and that will disable it for all sub directories unless you override it in another directory where you did want directory browsing.

To enable directory browsing in a sub directory after disabling in a higher level directory simply create an .htaccess file for that directory and add the following line.

Options +Indexes

This will allow directory browsing in this directory and all sub directories.

(1 vote(s))
This article was helpful
This article was not helpful