Disable Directory Listing In .htaccess
Posted by blogmeister on
May 13, 2012
To disable or prevent the directory access in your website if it does not contain any index file, add following in your .htaccess file.
|
1 2 3 |
<strong><span style="color: #0000ff;">Options -Indexes</span></strong> <strong><span style="color: #0000ff;"># or #</span></strong> <strong><span style="color: #0000ff;">IndexIgnore *</span></strong> |
If user points the browsers to a directory which does not have index file, then a 403 error will be shown in the browser.
This file level permission will also be applicable to all sub folders that do not have any default index file.
Donations appreciated. Every little $ helps. Or click Google +1.










One Response to “Disable Directory Listing In .htaccess”
I was not knowing this technique of .htacaccess. I will use this tactic & apply on my website. These directory listing disabling will be quite benefited in many ways. I will this code on website .
By Deal of the day on Jan 25, 2013