Mark,
I think that I may be able to clarify this. I ran into the same type of problem a few weeks ago. I had always defined my handlers inside a "Location" block and couldn't get the DirectoryIndex to work properly. I solved my problem by calling my handler from within a "Directory" block instead.
You should be able to find the answer you're looking for on the following page.
http://httpd.apache.org/docs/sections.html
I hope that this is the issue. Marc has failed to say that he is using mp2/apache2, so I won't be surprised if this is yet another problem introduced by apache-2.0 (incompatible mod_dir behavior wrt apache-1.3). see my recent bug reports to the httpd-dev list.
-----Original Message----- From: Marc M. Adkins [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:36 PM To: [EMAIL PROTECTED] Subject: DirectoryIndex doesn't see SetHandler path
This is going to seem odd...obscure...dumb...
I've been using code like this to set up handlers:
<Location /some/path/index> SetHandler perl-script PerlResponseHandler Some::Handler </Location>
Now I'm using this code to set up handlers for individual pages. The directive above is in a sense telling Apache "there is a directory /some/path/index which contains files which should be processed via Some::Handler" but in fact there is no such directory. There is just a handler. So in my mind I'm defining a single page with a handler.
All this works OK, weird though it may be, until I want a directory index. Say I want to go to url:
/some/path
The DirectoryIndex directive doesn't allow me to say that 'index' is a directory, only 'index.html'. That is to say, the following:
DirectoryIndex index index.html
doesn't cause Apache to automatically find /some/path/index, even if I have
defined one using AddHandler. I'm assuming this is because there is no such
file, the handler is attached to the /some/path/index directory, there isn't
anything for Apache to find.
For the moment I'm faking things out using the miracle of mod_rewrite:
RedirectMatch ^/some/path/index\.html /some/path/index
which makes it all work like I want. NOW Apache finds the handler for some
reason. So I'm not complaining, and I don't need a fix, but I wonder if I'm
missing something.
* AddHandler attaches a handler to a set of files with a given suffix. * SetHandler attaches a handler to a location (a directory, right?) and all of the files therein. * There isn't (?) a directive that attaches a handler to a single leaf in the directory tree which may in fact be non-existent in such a manner that the DirectoryIndex directive will find the leaf.
Have I missed something? Am I abusing the tool?
mma
--
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com