Nick Kew wrote:
> Details, please. If Apache does that, we should know.
>
I noticed that with Apache 2.0.54, *by default*, directory indexing
produces an ugly PRE element containing an HR element as well as one IMG
for every file.
Moreover using PRE for tabular data in an HTML 3.2 document is ugly. HTML
3.2 has tables.
As a sample: Look at the source code at that URI:
http://www.apache.org/dist/httpd/binaries/
It's generated by Apache 2.3.0 (August 24, 2007, 17:00 UTC).
However, I looked at the source code of Apache 2.2.4 (the latest stable
release) that I directly downloaded from apache.org.
The C file httpd-2.2.4/module/generators/mod_autoindex.c contains the
guilty tag soup generator.
I noticed that a tabular layout, with proper HTML tables, was generated if
a flag TABLE_INDEXING was set.
So, I read (searched into) the friendly manual (I should have started with
that, but was too lazy), and quickly found that the parameter HTMLTable of
the option IndexOptions, activates the "good" index generator.
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#indexoptions
It's marked as "Experimental, Apache 2.0.23 and later", but it works quite
well.
My statement about tag soup was mainly related to the fact everytime I see
an Apache directory on the WWW (in Year 2007), it uses the old PRE tag
soup....
As you see, Apache's website is not exception to this rule.
But, that doesn't change the fact that Apache can generate valid HTML code
(which seems to be conforming, tough there's one ugly thing with <hr>), if
fed with the right options.
So, there's no reason not to use the Apache indexing facility on releases
over 2.0.23.
PS: All the tests have been done on GNU/Linux, in an i386 environment,
with the Fedora Core 4 distro.
--
You can contact me at <tabkanDELETETHISnaz.RemoveThis@yahoDELETETHATo.fr>