CGI Redirect to another page

Tim Howarth tim at
Wed Sep 24 08:58:26 CEST 2003

In message <NW7cb.525$0j5.737525852 at>
          "Andrew Chalk" <achalk at> wrote:

> In a Python script running under CGI, can I programatically redirect the
> program to another page.

Do you mean redirect the client browser ?

> Assume that I have a static HTML page that I want displayed (e.g.
> index.htm). Other than 'print ...' is there any way to redirect to this
> URL (for example, like Response.Redirect() in ASP)?

Assuming you mean not to print the whole page, when you say "Other than
'print ...'" then;

print "Location: http:abcxyz.index.html"

AFAIUI it simply sends a redirect header.

 |im    ---- ARM Powered ----

More information about the Python-list mailing list