How to do simple http redirect using Python?

前端 未结 1 1207
时光取名叫无心
时光取名叫无心 2021-01-18 16:41

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-bin directory of Apac
相关标签:
1条回答
  • 2021-01-18 17:41

    To redirect using your current setup (CGI apache):

    print("Location:http://newurl.com/foobar")
    print # to end the CGI response headers.
    
    0 讨论(0)
提交回复
热议问题