in reply to Re: Re: Returning to A Referring Page
in thread Returning to A Referring Page

Just to make it complete though:
$jump_to = $ENV{'HTTP_REFERER'} || 'http://www.yourwebpage.com'; print "Status: 302 Moved\n"; # thats the spec print "Location: $jump_to\n\n";
Some Browsers would ignore the redirection attempt without the correct status. But if you use CGI.pm it will do it for you :-)

Have a nice day
All decision is left to your taste

Replies are listed 'Best First'.
Re: Re: Re: Re: Returning to A Referring Page
by Juerd (Abbot) on Jan 20, 2002 at 19:47 UTC
    I don't know about other webservers, but Apache changes the status according to the other headers. If there's a Location: header, the status will be 302.
    Status headers aren't sent as-is to the browser, they're in the first response line: HTTP/1.1 302 Moved.

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$