如何用Python实现简单的HTTP重定向?
如何用Python做简单的HTTP重定向?不使用meta标签。
更新:
我在Apache的cgi-bin目录下使用Python 2.7.1作为CGI。1 个回答
6
要在你现在的设置下(CGI apache)进行重定向:
print("Location:http://newurl.com/foobar")
print # to end the CGI response headers.