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