§ 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
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
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 "Simpler adding & removing element classnames" - Actually, the addClassName function does what you want, pretty much the same way you suggest.
- angie on "Simpler adding & removing element classnames" - And what if I want to add a class, but keeping the csseals the element already has?I mean, I have an element with a class, let's name…
- backlinks on "Adjust iframe height to contents" - Definitely helped me.
- Slashback on "Simpler validate form fields are filled in (no additional class names)" - You are welcome!
- humour on "Simpler validate form fields are filled in (no additional class names)" - thanks for the script !