If you want to use Apache’s automatic index functionality for directories, yet have your own custom messages on those index pages, here’s how you do it. Simply add to the .htaccess file for the directory (create it if it doesn’t already exist) the following line:
HeaderName HEADER.html
where HEADER.html is the name of a file that contains the HTML markup that you want to include at the top of the page. To add content to the bottom of the directory listing, use:
ReadmeName FOOTER.html
again, replacing FOOTER.html with the file that contains your desired markup.
There are technical details I won’t go into here; read them in the Apache documentation. I’ve implemented it here and I intend to do so for the directories on my site soon.

Recent Comments