Same script with different locations

Same script with different locations

am 29.05.2011 19:40:59 von Chris Faust

This is a multi-part message in MIME format.

------_=_NextPart_001_01CC1E27.92832DF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Folks,
=20
I wanted to know if there was anything wrong with using the same MP2 =
content handler with multiple Location directives in apache and using =
$r->location() to determine the script that should be used in forms, =
redirects etc.
=20
We have someone that insists in having different URL's doing something =
pretty specific while 75% of everything else is share (auth, profiles =
etc).
=20
It seems to work fine, whatever URL you come in on you will stay on, but =
there is just something about doing it that made me want to ask.
=20
TIA!
=20

------_=_NextPart_001_01CC1E27.92832DF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

=0A=
=0A=
=0A=
=0A=

Folks,
=0A=
 
=0A=
I wanted to know if there was anything =
wrong with using the same MP2 content handler with multiple =
Location directives in apache and using $r->location() to determine =
the script that should be used in forms, redirects etc.
=0A=
 
=0A=
We have someone that insists in having =
different URL's doing something pretty specific while 75% of everything =
else is share (auth, profiles etc).
=0A=
 
=0A=
It seems to work fine, whatever URL you =
come in on you will stay on, but there is just something about doing it =
that made me want to ask.
=0A=
 
=0A=
TIA!
=0A=
 

------_=_NextPart_001_01CC1E27.92832DF0--

Re: Same script with different locations

am 29.05.2011 20:03:38 von torsten.foertsch

On Sunday, May 29, 2011 19:40:59 cfaust-dougot wrote:
> I wanted to know if there was anything wrong with using the same MP2
> content handler with multiple Location directives in apache and using
> $r->location() to determine the script that should be used in forms,
> redirects etc.

Nothing wrong with it. But be careful, the administrator can try to=20
configure it like:



or



I am not 100% sure but I think $r->location will contain "(something|
special)/" in that case.

Torsten Förtsch

=2D-=20
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Re: Same script with different locations

am 30.05.2011 02:02:15 von aw

Torsten Förtsch wrote:
> On Sunday, May 29, 2011 19:40:59 cfaust-dougot wrote:
>> I wanted to know if there was anything wrong with using the same MP2
>> content handler with multiple Location directives in apache and using
>> $r->location() to determine the script that should be used in forms,
>> redirects etc.
>
> Nothing wrong with it. But be careful, the administrator can try to
> configure it like:
>
>
>
> or
>
>
>
> I am not 100% sure but I think $r->location will contain "(something|
> special)/" in that case.
>
It does, I can confirm.
I had a case today, with something like this :


SetHandler modperl
PerlResponseHandler blabla
...

and in the handler, with $r->location, I got something like "\\.thtm$"
$r->filename on the other hand gave the full *path* (on disk).