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 4001 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
cPanel Hosting in India - cPanel Hosting in India.

Grab an SSL for your website and SAVE 20% now. Coupon Code SSLSAVE20.

MilesWeb Hosting Forum