[mod_python] Publisher Handler and redirect

vio vmilitaru at sympatico.ca
Thu Aug 15 13:38:50 EST 2002


I believe the defining docs on mod_python redirection live in the FAQ (already).
http://www.modpython.org/FAQ/faqw.py?req=show&file=faq03.002.htp

Cheers, 
Vio


* Michael Krasnovsky <mk at lrn.ru> [020815 13:26]:
> Hi, Gregory!
> 
> Thanks a lot. It works.
> I also think that  this case should be described somewhere in FAQ.
> Mateusz is right.
> 
> Michael.
> 
> On Wed, 14 Aug 2002 18:45:57 -0400 (EDT)
> "Gregory (Grisha) Trubetskoy" <grisha at modpython.org> wrote:
> 
> > 
> > Try something like:
> > 
> >  def test(req):
> >        req.headers_out["Location"] = "http://www.example.com"
> >        req.status = apache.HTTP_MOVED_TEMPORARILY
> >        return "Going to Example.com..."
> > 
> > 
> > 
> > On Wed, 14 Aug 2002, Michael Krasnovsky wrote:
> > 
> > > Hello!
> > >
> > > I have a problem. I need redirection inside a publisher handler. I
> > > try using req.headers_out["Location"] = "http://www.example.com",
> > > but it doesn't work.
> > > Here is the example:
> > >
> > > def test(req):
> > > 	"""
> > > 	"""
> > > 	req.headers_out["Location"] = "http://www.example.com"
> > > 	req.send_http_header()
> > >
> > > 	return "Going to Example.com..."
> > >
> > >
> > > What's wrong?
> > > I use the latest mod_python version and 1.3.26 Apache running on
> > > Linux.
> > >
> > > Thanks.
> > >
> > > With best regards,
> > > Michael.
> > >
> > > _______________________________________________
> > > Mod_python mailing list
> > > Mod_python at modpython.org
> > > http://www.modpython.org/mailman/listinfo/mod_python
> > >
> > 
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://www.modpython.org/mailman/listinfo/mod_python
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list