[mod_python] Re: Redirects

vio vmilitaru at sympatico.ca
Sat Oct 19 22:58:58 EST 2002


You do redirection in mod_python with something like this:


def handler(REQUEST):

   _REQUEST = REQUEST._req
...
   _REQUEST.headers_out['location'] = 'http://some_URL.org/...'
   _REQUEST.status = apache.HTTP_MOVED_PERMANENTLY
   _REQUEST.send_http_header()
   raise apache.SERVER_RETURN, apache.OK



Hope this helps,
Vio





More information about the Mod_python mailing list