$r->location() question

[prev] [thread] [next] [Date index for 2005/05/25]

From: Adam Prime x443
Subject: $r->location() question
Date: 16:53 on 25 May 2005
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.=20

So my .conf looks like this.

    <Location /crap>
        SetHandler perl-script
        PerlHandler Something::Crap=20
    </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

$r->location() question
Adam Prime x443 16:53 on 25 May 2005

Re: $r->location() question
Stas Bekman 17:34 on 25 May 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52