in reply to •Re: Re: Perl/CGI redirect.
in thread Perl/CGI redirect.

Uhm okay I feel sorry then for posting wrong stuff on this one. But the one with the full-URL is even in perldoc CGI:

One hint I can offer is that relative links may not work correctly when you generate a redirection to another docu�
ment on your site. This is due to a well-intentioned optimization that some servers use. The solution to this is to use the full URL (including the http: part) of the document you are redirecting to.

But anyway I'll go back to the books and think more carefully before I post something next time, because it's really bad to post wrong stuff :(

/me asks the gods for mercy and goes back to meditation...

Replies are listed 'Best First'.
•Re: Re: •Re: Re: Perl/CGI redirect.
by merlyn (Sage) on May 20, 2002 at 20:24 UTC
    One hint I can offer is that relative links may not work correctly when you generate a redirection to another docu? ment on your site. This is due to a well-intentioned optimization that some servers use. The solution to this is to use the full URL (including the http: part) of the document you are redirecting to.
    I know that quote. That's not talking about /fred/barney/dino.txt. That's talking about just barney/dino.txt, which does in fact have problems in some situations. The "solution" is overkill (always use an external redirect), but successful. An internal redirect (one that is an absolute path without a scheme or hostname) is also valid for some operations, and it's important to know when.

    -- Randal L. Schwartz, Perl hacker