Where / how does Apache generate the HTML code used in the default directory listing?
- by Ellen B
I am looking to modify the HTML that apache generates for its default directory listing.
I already know how to create a HEADER.html file that gets included for every directory listing. I am attempting to change the actual html that Apache generates for the file listing itself; right now my MacOS apache generates this for example:
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="ios-prototype/">ios-prototype/</a> </td><td align="right">07-Dec-2012 16:47 </td><td align="right"> - </td><td> </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="magneto-git/">magneto-git/</a> </td><td align="right">07-Dec-2012 16:46 </td><td align="right"> - </td><td> </td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
I want a different HTML structure (like, say, an OL) generated when my server spits back directory listings. (FYI I'm doing a bunch of mobile browser prototyping with my local webserver & need to make it not totally horrible to browse with fingers to the right test directory — the table structure sucks, and while I can mod a lot of it with CSS it's still going to be ganky.)