CGI Redirect to another page

Tim Howarth tim at worthy.demon.co.uk
Wed Sep 24 02:58:26 EDT 2003


In message <NW7cb.525$0j5.737525852 at newssvr11.news.prodigy.com>
          "Andrew Chalk" <achalk at XXXmagnacartasoftware.com> 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