Disable or Enable Directory Browsing or Indexing

Today a client want to disable directory browsing on his web site. With Directory Browsing or Indexing enabled on your web server, if you don’t upload index.html, web server will show list of all files available in the folder.
 
You can stop directory browsing by two days, the easy way is upload index.html file.
 
Disable Directory Browsing with .htaccess
 
.htaccess file allow you to override some of the server side settings.
 
To disable Directory Browsing, create a file with name .htaccess with following content
 
Options -Indexes
 
If you already have some thing in your .htaccess file, just add this as last line.
 
Enable Directory Browsing
 
To enable directory index or directory browsing, create an .htaccess file with
 
Options +Indexes
 
Directory index will work only if there is no index.html or default document uploaded.
 
Creating .htaccess file on WIndows
 
You may find it difficult to create .htaccess file on Windows, if you try to rename a file to .htaccess, windows will ask you to type file name. To solve the problem, go to command prompt (DOS) and create the file.
 
echo s > .htaccess
 
This will create a file with name .htaccess in the current folder.
 
Now use notepad to edit the file.
 

Related posts:

  1. Apache Allow Folder Browsing
  2. Web Directory
  3. WebHostingNeeds.com Free Web Hosting Directory
  4. Creating Virtual Directory in Windows 2003
  5. Deleting Mail Enable Bad Mail from Windows 2000 Server
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>