CGI Redirect

Ben Ocean zope at thewebsons.com
Tue May 1 12:50:35 EDT 2001


At 05:24 PM 5/1/2001 +0200, you wrote:
> > Hi;
> > I'm writing a CGI script and I need to redirect the visitor to
>another page
> > (as opposed to posting their form data). How do I do this? The perl
> > equivalent would be:
> > print "Location:http://blah.com\n\n";
>
>This should work without the trailing semicolon in Python (assuming
>that
>nothing outputs any other headers before, of course!).

Ah, yes, but in order to get the form to not toss up an HTTP 500 server 
error I have to put in the following:

print "Content-type: text/html\n\n"

How do I escape that?
TIA,
BenO





More information about the Python-list mailing list