in reply to Re: CGI and redirect
in thread CGI and redirect

the "Location:" HTTP header is the only way to do a redirect with HTTP (and there's also its crappy META HTTP-EQUIV cousin but that's HTML). Location and Redirect are one and the same thing.

as btrott says below, the real problem was that the header function was terminating the HTTP headers (by means of a blank line), before the redirect function was called, so the "Location: ..." header was interpreted by your browser (correctly) as the page body.