You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by ___cliff rayman___ <cl...@genwax.com> on 2001/02/09 01:39:22 UTC

Re: Redirection Location MUST be absolute (was Re: Send a cookie, AND a redirect ?)

you are supposed to be able to use:
<base href="/foo/bar/fred.html">

which changes the base of the document.  if u really wanted to use internal
redirects, you would have to insure that all documents contained this tag,
or filter the page and include it yourself.

of course this is just a spec, determining which browsers properly use
it, is beyond me.


--
___cliff rayman___cliff@genwax.com___http://www.genwax.com/

"Randal L. Schwartz" wrote:

> >>>>> "Robert" == Robert Landrum <rl...@capitoladvantage.com> writes:
>
> Robert> By using relative *URLs* such as /some/location, you avoid changing
> Robert> the location field in the browser window, which is often desired.  If
> Robert> you use an absolute *URL*, the location field changes to the absolute
> Robert> URL.
>
> Actually, I'll disagree with that.  NEVER use internal redirects
> (which you call "relative URLs" but that's another story) unless you
> are fully understanding about WHY *I* say *NEVER*, in my strongest
> language.
>
> As a hint... are you willing to be responsible for how all the
> relative URLs in the resulting document are treated, including all
> documents called from there?
>
> The problem is that the browser still thinks it got
> "/foo/bar/fred.html", so if an internal redirect was performed to
> "/abc/def/ghi.html" and it had a relative link to "../xyz.html", the
> browser will fetch "/foo/xyz.html", not to the correct
> "/abc/xyz.html", since the browser had no visibility to the /abc part
> of that equation.
>
> NEVER use internal redirects.
>
> At least not until you understand why I say "NEVER".




Re: Redirection Location MUST be absolute (was Re: Send a cookie, AND a redirect ?)

Posted by ___cliff rayman___ <cl...@genwax.com>.
___cliff rayman___ wrote:

> you are supposed to be able to use:
> <base href="/foo/bar/fred.html">

make that:
<base href="http://host.mydomain.net/foo/bar/fred.html">

>
>
> which changes the base of the document.  if u really wanted to use internal
> redirects, you would have to insure that all documents contained this tag,
> or filter the page and include it yourself.
>
> of course this is just a spec, determining which browsers properly use
> it, is beyond me.
>
> --
> ___cliff rayman___cliff@genwax.com___http://www.genwax.com/
>
> "Randal L. Schwartz" wrote:
>
> > >>>>> "Robert" == Robert Landrum <rl...@capitoladvantage.com> writes:
> >
> > Robert> By using relative *URLs* such as /some/location, you avoid changing
> > Robert> the location field in the browser window, which is often desired.  If
> > Robert> you use an absolute *URL*, the location field changes to the absolute
> > Robert> URL.
> >
> > Actually, I'll disagree with that.  NEVER use internal redirects
> > (which you call "relative URLs" but that's another story) unless you
> > are fully understanding about WHY *I* say *NEVER*, in my strongest
> > language.
> >
> > As a hint... are you willing to be responsible for how all the
> > relative URLs in the resulting document are treated, including all
> > documents called from there?
> >
> > The problem is that the browser still thinks it got
> > "/foo/bar/fred.html", so if an internal redirect was performed to
> > "/abc/def/ghi.html" and it had a relative link to "../xyz.html", the
> > browser will fetch "/foo/xyz.html", not to the correct
> > "/abc/xyz.html", since the browser had no visibility to the /abc part
> > of that equation.
> >
> > NEVER use internal redirects.
> >
> > At least not until you understand why I say "NEVER".

--
___cliff rayman___cliff@genwax.com___http://www.genwax.com/