开发者

How to do simple http redirect using Python?

开发者 https://www.devze.com 2023-02-17 06:22 出处:网络
How to do simple http redirect using Python? without using meta. UPDATE: I am using Python 2.7.1 as a CGI from within the cgi-bi开发者_Python百科n directory of Apache.To redirect using your current s

How to do simple http redirect using Python? without using meta.

UPDATE:

I am using Python 2.7.1 as a CGI from within the cgi-bi开发者_Python百科n directory of Apache.


To redirect using your current setup (CGI apache):

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号