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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month8 days, left to enroll

765 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