Assume i have a handler that sits in a location, and that handler has it's own
admin interface built in. I also want to be able to easily change the
directory that the handler is running in, or have it running in multiple
locations (so i don't want to hardcode the location into the script.
So my .conf looks like this.
<Location /crap>
SetHandler perl-script
PerlHandler Something::Crap
</Location>
<Location /crap/admin>
AuthName "Something"
AuthType Crap
PerlAuthenHandler Something::Authen
PerlAuthzHandler Something::Authz
require valid-user
</Location>
The only annoying thing about this is that $r->location will return
'/crap/admin/' when i'm on the admin part of the site. Is there any way to get
the actual location that the PerlHandler is running in despite the fact i'm
using Authen and Authz handlers in /crap/admin/?
Right now i just parse the /admin out of the location() myself, but that's kind
of annoying. I haven't tried resetting the location though (like
$r->location($newlocation)) but i'm not sure if that will work offhand.
Is there a better way to do this kind of thing?
Adam