tags:

views:

181

answers:

1

If I want to redirect the user from a cgi script to a HTML page using core libraries from the following:

import cgi

Please could someone point me in the right direction. Nothing more. Simply redirect from cgi script to html page. How ever you would do this Python. If you have to physically write out the HTTP Response Headers to achieve this, then I would appreciate any info on how to do this. TIA

Andrew

+1  A: 

You need to output one more header ("Status") in addition to the Location one, e.g.:

print "Status: 301 Moved",
print "Location:/wherever.com/"
Alex Martelli
THANK YOU!!! Appreciate it. I am unfamiliar with Python. Thanks again.
REA_ANDREW