§ Format apache directory listing
The default directory listing apache shows is controlled by mod_autoindex and it has some options available.
I wanted to be able to see some long filenames. I searched... I searched. So I gave up and looked for scripts that would do it. I found http://autoindex.sourceforge.net/. Nice, but not quite what I wanted; I still wanted the links to be direct to the file. So I started writing. It's actually quite easy– wait, some of the folders I want to use this on are on a different volume from DOCUMENT_ROOT, via a symlink. Umm, ok, I'll get this figured out in a minute...
So now I'm searching for something else, but up pops in my google results The Answer: mod_autoindex.
The IndexOptions directive allows a whole bunch of, ahh, options for the index. In .htaccess, I put
IndexOptions NameWidth=*
and now it shows the whole filename.
Naturally I got pretty excited by this, so I also added more stuff:
IndexOptions NameWidth=* FancyIndexing FoldersFirst HTMLTable SuppressHTMLPreamble
HeaderName /dirlistheader.html
In /dirlistheader.html I included some css so now I have purty file lists!
Well, ok, maybe not pretty, but I like it better.
last edited on January 14th, 2010 at 10:26 AM
- Slashback on "window.onload via double delegate function" - The makeDoubleDelegate() function is rather simple and straightforward, so I find it quite odd that Chrome can't handle it. I do…
- Joaquin Serra on "window.onload via double delegate function" - Hello, i'm using this function one year but i realized now that in Google chrome doesn't work. Have you got some solution?
- tadd on "Javascript function to add css" - thanks for the post
- Slashback on "window.onload via double delegate function" - The makeDoubleDelegate function just needs to be available, so include it once somewhere in your html file or an included javascript…
- Neil Haskins on "window.onload via double delegate function" - I don't understand exactly how this is to be used; I've just used javascript in a cut and paste manner really. Does the whole code go…