SolutionCottage.com
Posted  19 Mar 2009 - 18:11:44

Category: Web Hosting


Enable/Disable folder listing using a .htaccess file.

Issue:
You want to enable / disable folder listing on a specific folder on your website.

Solution:
Create a file called .htaccess in the folder you want to change listing options. Then, depending on if you want to enable or disable folder listing, use the following lines:

Enable:

Options Indexes

Disable:
Options -Indexes

Also, if you wish to exclude some files, include a row like this one:
IndexIgnore *.html *.htm *.txt *.doc



Marked as helpful by 5 users




0 comments:








© SolutionCottage 2008-2011 7/21/2017 3:31:59 AM