in reply to Re: Redirect problem
in thread Redirect problem

Nothing. This isn't a compilation problem or so, the white page is probably because of that the "Location:" is the only line that is printed.

Replies are listed 'Best First'.
Re^3: Redirect problem
by afoken (Chancellor) on Feb 01, 2012 at 09:17 UTC

    AFAIK, the Location header must contain an absolute URL, not a relative.

    Use Firebug or Wireshark to find out what is sent to the browser. I guess Apache enforces status 404, so you won't get the 30x redirection that you expect. Perhaps you need to add a Status header.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      It actually works when calling /cgi-bin/errorpage.pl directly, so I guess that the Location isn't the problem, this is probably related more to the Apache handling?

        So use Firebug, Wireshark, or if you have no better idea, use

        lwp-request -m GET -e -s -S http://your.server/some/page/that/does/not/exist

        and look at the HTTP headers returned.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      AFAIK, the Location header must contain an absolute URL, not a relative.

      HTTP location says different

        Actually, the linked page says about relative redirects:

        This example, while incorrect based on the internet standard, will often work in popular browsers.

        Which makes the sentence "The Location header must contain an absolute URL, not a relative." correct as in accordance with the standard.

Re^3: Redirect problem
by Anonymous Monk on Feb 01, 2012 at 10:33 UTC

    Nothing. This isn't a compilation problem or so, the white page is probably because of that the "Location:" is the only line that is printed.

    Logs contain things other than compilation errors.

    In any case, you should use CGI->redirect