Skip to main content.
August 17th, 2005

Disable or Enable Directory Browsing or Indexing

Browsing or indexing is an option that allows the contents of a directory to be displayed in the browser when the directory does not contain an index page or default page.

For example, if you make an http call to a directory such as http://yourdomain.com/files/, it would list all the files in that directory without the need for an html page with links.

We will need to create a blank file called “.htaccess”. You can name it “htaccess.txt” while your editing it, then rename the file to “.htaccess” after the file is on your web server, and upload it in your site root.

To Disable Directory Browsing or Indexing

Type or copy and past the following line of text in to your blank file.
the word “All” for every folder in that directory follows the same rule.

Options All -Indexes

Enable Directory Browsing or Indexing

You can reactivate it by adding the following line to your .htaccess file:


Options +Indexes

Once this is added, the directory will fully index again.

Posted by Dablu as htaccess Tutorials at 6:24 AM IST

2 Comments »

Related Links: Manage the Programs Run at Windows Startup (All Windows) Popular | New USB Flash Drive Sports Bootable OS, | Oracle Takes Years To Fix Holes July | Get rid of Windows programs that run at startup |
  

Related Links

Fatal error: Call to undefined function rssLinkList() in /home/esansar/public_html/blog/wp-content/themes/gila/index.php on line 55