Difference between revisions of "Displaying Directory Contents In A CS Webpage"

(Created page with "Some CS users want to display the contents of a directory (located under their public_htm directory), however, CS has directory indexes disabled sitewide (to prevent people f...")
 
Line 18: Line 18:
  
 
[[Category:Webpages and Webservices]]
 
[[Category:Webpages and Webservices]]
 
 
 
 
and you are not using an index.html file in that directory, where the index.html file has links to the contents of that directory.
 

Revision as of 13:18, 10 April 2014

Some CS users want to display the contents of a directory (located under their public_htm directory), however, CS has directory indexes disabled sitewide (to prevent people from inadvertently disclosing files by accident).

But, you can still display the contents of the directory using one of two methods:

Method 1: Using an index.html File

You can create an index.html file that contains links to the contents of the directory.

Method 2: Using A .htaccess File

You can add a .htaccess file to the directory with the following contents:

    Options +Indexes

The settings in a .htaccess file apply to the directory it is in and to any of its subdirectories (recursively).