Include a brief description above a directory listing on Apache

Posted on 2005-03-10
Medium Priority
Last Modified: 2008-01-09
I have an Apache web server hosting a folder with several subfolders with contents of each of our products with misc info such as high res images etc.  Directory listing is enabled so these folders show up just as I want.  I would like to put a brief descriptoin above the directory listing explaining how things are organized and a link to a how-to page if user "really" doesn't get it.  I've seen this done before on an Apache server, but I can't find any documentation on it.  Ideally it would be similiar to an index.html file, but in addition to the content in the index.html file, below it, it would also show all files/folders in the current directory.
Question by:chadly2
LVL 27

Accepted Solution

caterham_www earned 252 total points
ID: 13512016
I think you're looking for the Directive HeaderName from mod_autoindex to insert a file above the DirectoryListing

###use this in a .htaccess file for your directory or in httpd.conf
Options +Indexes
# remove <html><body> tags from description.html, see http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#indexoptions.suppresshtmlpreamble
IndexOptions +SuppressHTMLPreamble
HeaderName /desctiption.html

If you use this in a .htaccess file, make sure that AllowOverride in httpd.conf is set at least to
AllowOverride +Indexes

see also http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#headername
LVL 51

Assisted Solution

ahoffmann earned 248 total points
ID: 13524356
ReadmeName README
HeaderName HEADER

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question