View Full Version : How to make a custom directory listing in apache.

02-25-2003, 11:24 PM
running: Apache 1.3.26

Right now, I've managed to get a custom directory listing by disabling directory listing and set up my 403 document to get the listing of the directory of the referring page (a real ghetto way, i know). My question is, how can I do this properly? From what I understand of "FancyIndexing", you can just add a header and change icons and such, but I want my listing to have much more on it (much more html, maybe another PHP script, who knows, I want room for expansion). Does anyone know how to do this? Thanks.


02-25-2003, 11:51 PM
You can do it with a php script:


02-26-2003, 05:03 AM
I already have a php file that can list a directory, but the problem is, I don't want to have to copy it to every directory.

12-10-2010, 09:23 PM
just for reference and google:

the trick is simple, just a little non-intuitive:
the DirectoryIndex directive will happily accept an _absolute_ path,
so just specify the path to your index generating script as last alternative,
and it will be run for any directory that does not have any other index file present.