Indices
Download (v1.1, sept 1 2009)
Apache’s default directory index pages are ugly. Indices is a set of hacks that makes them pretty, and more usable.
What it does
- Simple, clean design
- Easily customizable logo and link at the top
- Optional readme.html file inserted before file list
- Long filenames are visible
- Directory names in bold; trailing slashes stripped from directory names
- Nice file icons
- Output is XHTML 1.0 Strict, styled with CSS
- Should be easy to modify for your own needs
How it works
Unlike other PHP-based solutions, Indices is based on Apache’s built-in directory mechanism, so it’s pretty easy to seamlessly integrate it into your entire website.
Indices uses a few helpful Apache mod_autoindex directives, coupled with a bit of CSS and (optional) Javascript hackery. The README talks about installation and how everything works.
If you’re curious about the plumbing, read this blog post.
Requirements
I developed Indices for my web server, which runs Apache 2.0.x and PHP 5.1.x. It’ll probably require some tweaking to get it working with earlier versions of either.
If you’re running Apache 1, you’ll be able to use some of this code for inspiration, but you’ll need to do a lot more hackery.
Download
4 Comments so far
Leave a reply

I love this as it’s very easy to use and is non-intrusive. Nicely done.
Just a point about the README – it may be useful to add that if you are installing this to a directory that is not under the htdocs path using the Directory directive, you need to include the line:
AllowOverride Indexes Options
Thanks for sharing your excellent solution.
Is there anyway to specify folders or files to omit from the directory listing?
@Steve – That kind of thing should be done with Apache configuration; Indices’ purpose is to style Apache’s output.
@gse – Thanks. I should have searched Google first. IndexIgnore is what I needed.