Ответ 1
через cgi script?
print "Status:301\nLocation: http://www.google.com"
Можно ли отправить код статуса, отличный от 200, с помощью python cgi script (например, перенаправление 301)
через cgi script?
print "Status:301\nLocation: http://www.google.com"
Через приложение wsgi?
def simple_app(environ, start_response):
status = '301 Moved Permanently' # HTTP Status
headers = [('Location','http://example.com')] # HTTP Headers
start_response(status, headers)
return []