Custom directory listing possible?

by sheer coincidence I uploaded a file named README.html to a directory with just sub directories in it and lo and behold it actually displayed the file as html under what you’d normally see generated by directory listing. This is cool, but it leads me to inquire further.

Is there any way (at my level, the user level) to alter the markup of the the default directory listing pages spit out by Apache?


Yes and no.

There is no “template” for you to modify. However there are “options” you can set and this is in the Apache documentation at IndexOptions directive

In combination with this and the icon options and HeaderName/ReadmeName and the use of CSS, you could alter the appearance of the listings. Perhaps if you use JavaScript you could even re-write the HTML.

:cool: Perl / MySQL / HTML+CSS

awesome, thanks man. I’m just screwing up and getting 500’s tho :slight_smile:

what’s wrong with this:

IndexOptions +indexes +FancyIndexing +FoldersFirst

that it should throw a 500 internal server error?

thanks again!


um, disregard for the time being! I’m putting each on a new line and that seems to be doing the trick, grazi!


[quote]what’s wrong with this:

IndexOptions +indexes +FancyIndexing +FoldersFirst[/quote]
Where did that Indexes come from?!?! That is an option for the Options directive.

Options +Indexes IndexOptions +FancyIndexing +FoldersFirst

:cool: Perl / MySQL / HTML CSS

yeah yeeeeahhh… :slight_smile:

thanks for the help, I messed around and was pleasantly suprised with what you’re able to do with that. Thanks a million for the assist