Change autoindexing content-type
am 22.09.2007 20:11:15 von Jarkko
Hi,
Im trying to change the content-type of apache's autoindexing page.
Currently it's text/html but I would like to change it to application/xml,
so that I am able to transform the file list with xsl by making custom
Header and ReadMe pages. Is it possible to change the Content-Type HTTP
header for the file list? Already I've tried to change it with AddType,
ForceType and Header directives but none of these have any effect.
Re: Change autoindexing content-type
am 23.09.2007 14:49:18 von shimmyshack
On Sep 22, 7:11 pm, Jarkko wrote:
> Hi,
>
> Im trying to change the content-type of apache's autoindexing page.
> Currently it's text/html but I would like to change it to application/xml,
> so that I am able to transform the file list with xsl by making custom
> Header and ReadMe pages. Is it possible to change the Content-Type HTTP
> header for the file list? Already I've tried to change it with AddType,
> ForceType and Header directives but none of these have any effect.
you could use a rewrite for any URL ending with / where index.html (or
your default file list) does not exist) that takes the value of the
REQUEST_URI and sends it to a index_script.php (pl or whatever) which
generates the listing and sends the correct headers and of course
formats the document as xml. The default apache listing is in html and
would not be as easy to transform as xml using xsl, not as easy as if
you created your own xml file.