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 in htaccess Tutorials