How to disable directory listing / browsing in .htaccess file

Started by Dipak Bhoi, July 08, 2014, 01:16:21 PM

Previous topic - Next topic

Dipak Bhoi

Hello guys,

To prevent the server from showing a listing of the existing files from in one directory in case there is no index file in that directory. The Options directive is the place where you can enable or disable the index generation.

To disable directory list, add following line into your .htaccess file.

QuoteOptions -Indexes

To enable directory list, add following line into your .htaccess file.
Quote
Options +Indexes

That's all.

Enjoy !!!
MilesWeb - 30-Day Money Back
cPanel Web Hosting - cPanel Hosting in India
Grab a Free SSL for your website.  WordPress Optimized Solution.