CoderZone.org
Pages: 1 « previous     next »
  Print  
Author Topic: Apache Index Listing Configuration  (Read 4196 times) Bookmark and Share
phpMan2010
Newbie
*
Posts: 32



View Profile
« on: Jan 14, 2011, 07:13:58 am »

Sometimes you need to allow people to choose files from the server, but you don't want to write code to list the files.  You can customize Apache's IndexOptions and wrap the listing with some XHTML and CSS to create a nice interface.

# Allow display of directory
Options +Indexes

# Configure display options for directory
IndexOptions +FancyIndexing +FoldersFirst +SuppressDescription +SuppressHTMLPreamble +XHTML +HTMLTable +SuppressRules +SuppressIcon
AddType text/html .html

# Suppress the display of .gz and .email files in directory listings
IndexIgnore *.gz *.email

# Header and footer files for directory listings
HeaderName "/hdr/Header.html"
ReadmeName "/hdr/Footer.html"

Reference: http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html
Logged
Tags:
Pages: 1
  Print  
 
Jump to: