|
Home > Archive > Apache Server configuration support > September 2007 > Change autoindexing content-type
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Change autoindexing content-type
|
|
| Jarkko 2007-09-22, 7:17 pm |
| 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.
| |
| shimmyshack 2007-09-23, 1:35 pm |
| On Sep 22, 7:11 pm, Jarkko <jarkko...@gmail.com> 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.
|
|
|
|
|