March 2nd, 2004, 10:40 PM
-
Redirecting a web page on server side
Hi, I need some help here please..
I'm using apache as a web server.
How can I perform redirection on server side with python?
Thank you very much
Roy
March 3rd, 2004, 02:01 AM
-
If you can avoid sending any other MIME headers, Content-Type for instance all you have to do is print this...
Code:
#!/usr/bin/env python
print 'Location: http://www.python.org\n'
This will redirect the page to python.org using Python CGI
.
Mark.
March 3rd, 2004, 05:14 PM
-
A bit of a problem...
Originally Posted by netytan
If you can avoid sending any other MIME headers, Content-Type for instance all you have to do is print this...
Code:
#!/usr/bin/env python
print 'Location: http://www.python.org\n'
This will redirect the page to python.org using Python CGI

.
Mark.
Hi Mark.
Thanks for your reply.
The situation is, that I have a login page that authenticates the user,
if the user is authenticated then :
1. An header with cookie ( sessionID ) is sent to the client
2. A redirect for a different page is required.
How can I achieve that ?
Cheers
Roy