We only use absolute URLs /images/some.gif.  When dealing with 
apache, it's often neccesary to see the previous requests environment 
(error pages, etc.) so that you can show that information to the user 
and email it to the webmaster.  That's only possible with an internal 
redirect.  As in

ErrorDocument 503 /error.pl

Using a full path there causes you to lose all of that valuable 
information that was stored in the Environment.

ErrorDocument 503 http://www.somehost.com/error.pl

I almost always use external redirects, except when I don't want the 
page I'm redirecting to bookmarked.

But I definitly understand why you say *NEVER*.

Rob

> >>>>> "Robert" == Robert Landrum <[EMAIL PROTECTED]> 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".
>
>--
>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
><[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
>Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
>See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


Robert L. Landrum
Senior Programmer
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UNIX was not designed to stop its users from doing stupid things,
as that would also stop them from doing clever things. --- Doug Gwyn

Reply via email to