Same script with different locations

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,

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.

We have someone that insists in having different URL's doing something =
pretty specific while 75% of everything else is share (auth, profiles =
etc).

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.

TIA!


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

<HTML dir=3Dltr><HEAD>=0A=
<META content=3D"text/html; charset=3Dunicode" http-equiv=3DContent-Type>=0A=
<META name=3DGENERATOR content=3D"MSHTML 8.00.7601.17573"></HEAD>=0A=
<BODY>=0A=
<DIV><FONT color=3D#000000 size=3D2 face=3DArial>Folks,</FONT></DIV>=0A=
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>=0A=
<DIV><FONT size=3D2 face=3DArial>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.</FONT></DIV>=0A=
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>=0A=
<DIV><FONT size=3D2 face=3DArial>We have someone that insists in having =
different URL's doing something pretty specific while 75% of everything =
else is share (auth, profiles etc).</FONT></DIV>=0A=
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>=0A=
<DIV><FONT size=3D2 face=3DArial>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.</FONT></DIV>=0A=
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>=0A=
<DIV><FONT size=3D2 face=3DArial>TIA!</FONT></DIV>=0A=
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV></BODY></HTML>
------_=_NextPart_001_01CC1E27.92832DF0--
Chris Faust [ So, 29 Mai 2011 19:40 ] [ ID #2060234 ]

Re: Same script with different locations

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:

<Location ~ "(something|special)/">

or

<LocationMatch ...>

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

Torsten Förtsch

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

Like fantasy? http://kabatinte.net
torsten.foertsch [ So, 29 Mai 2011 20:03 ] [ ID #2060235 ]

Re: Same script with different locations

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:
>
> <Location ~ "(something|special)/">
>
> or
>
> <LocationMatch ...>
>
> 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 :

<FilesMatch "\.thtm$">
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).
aw [ Mo, 30 Mai 2011 02:02 ] [ ID #2060257 ]
Webserver » gmane.comp.apache.mod-perl » Same script with different locations

Vorheriges Thema: set environment variables in tomcat
Nächstes Thema: PerlAuthenHandler returns HTTP_UNAUTHORIZED (401) but Apache sendsREDIRECT (302) and drops Set-Cooki