in reply to CGI and redirect

You probably want to use the Location header as jjhorner described. Redirect does not work like it appears that you believe it to.

Redirect is for telling a browser that the site it was looking for has moved. Location is for redirects as most people think of them.

Replies are listed 'Best First'.
RE: Re: CGI and redirect
by mdillon (Priest) on May 24, 2000 at 21:27 UTC
    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.