Returning http status codes in Python CGI

Ash picture Ash · May 7, 2009 · Viewed 8.1k times · Source

Is it possible to send a status code other than 200 via a python cgi script (such as 301 redirect)

Answer

Jiri picture Jiri · May 7, 2009

via cgi script?

print "Status:301\nLocation: http://www.google.com"