MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: How to disable directory listing / browsing in .htaccess file  (Read 4296 times)

0 Members and 1 Guest are viewing this topic.

Offline Dipak Bhoi

  • MilesWeb Team Member
  • Full Member
  • ***
  • Posts: 208
  • Karma: +5/-0
    • View Profile
    • MilesWeb Internet Services
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.

Quote
Options -Indexes

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

That's all.

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

MilesWeb Hosting Forum