On Sunday 09 November 2003 2:42 am, S Woodside wrote:
>
> This got me hacking for a workaround (there isn't any clean one, I
> can't use document('http://mysite.com/foo/bar.xml') for relative
> requests...)  and then thinking about AxHandleDirs which has given me
> grief in the past. I don't like the way AxHandleDirs works. I think it
> goes against the file-oriented design of AxKit and the apache config
> files. There's lots of useful apache directives (like <Files ...>) and
> AxAdd*Processor directives that can be used with files. But with
> AxHandleDirs you basically are pretty limited in your options.
>
> Not only that, but it's kind of odd because you only get the XML back
> if the UA opens the directory foo/bar/ ... you don't get the XML
> directory file back if you call foo/bar/index.html . I think that's
> wrong -- the directory XML should replace index.html by default. Or you
> could name the file with something like AxHandleDirs <filename.xml> And
> then if you request that file, you get the auto-generated index for the
> dir it resides in.

Well, my perusal of the 'Eagle Book' would indicate to me that if you created 
an alias like Alias /xyz/index.xml /xyz/ and then declared a handler for the 
'magic' mime type httpd/unix-directory that you would trap calls to index.xml 
even though it does not exist and map them to your handler. 

The disadvantage is you have to do it basically in every directory. Using a 
rewrite rule you could probably create a solution with only one entry in 
httpd.conf (I am 99% certain on that working, just didn't delve into it).

Naturally you could extend this to any kind of name you liked with multiple 
Alias directives, so you could capture index.html index.htm etc. My guess is 
that this is not too dissimilar to what Apache does now.

I can think of other ways to deal with it as well. One could install a custom 
mime type checker, a URL trans handler could be used to redirect all 
'directory' calls to some specific URL, perhaps tacking information onto the 
query string (or in pnotes) telling your directory indexer (content handler) 
which directory you really wanted to index, etc. 

Heck, we could have a contest. Everyone has to come up with a new way to do 
this every day until all but one person runs out of ideas. I bet it could go 
on a LONG time. Apache really has a great surplus of functionality!

>
> simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to