CGI and Redirect

Fredrik Lundh fredrik at pythonware.com
Tue Feb 21 09:07:16 EST 2006


Grzegorz Slusarek wrote:

> Hi All. I need to redirect user in my CGI script,  i Try to use prin
> "Location: "+url but this is not working. Can anyone tell me what I'm
> doing wrong?

something like

    print "Status: 302"
    print "Location: " + new_url
    print
    sys.exit(1)

should work (assuming that sys is imported, of course)

(if it doesn't, you have to define "not working")

hope this helps!

</F> 






More information about the Python-list mailing list