如何使用Python做简单的http重定向? [英] How to do simple http redirect using Python?
本文介绍了如何使用Python做简单的http重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用Python做简单的http重定向? 。
How to do simple http redirect using Python? without using meta.
更新:
我使用Python 2.7.1作为cgi中的CGI,UPDATE:
I am using Python 2.7.1 as a CGI from within the cgi-bin directory of Apache.推荐答案
使用您当前的设置重定向(CGI apache):
To redirect using your current setup (CGI apache):
print("Location:http://newurl.com/foobar")
print # to end the CGI response headers.
这篇关于如何使用Python做简单的http重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文