How to make simple HTTP redirect using Python?

How to make simple HTTP redirect using Python? without using meta.

UPDATE:

I am using Python 2.7.1 as CGI from the cgi-bin Apache directory.
+5
source share
1 answer

To redirect using the current setting (CGI apache):

print("Location:http://newurl.com/foobar")
print # to end the CGI response headers.
+5
source

All Articles