[mod_python] Updating the URL after a redirect

Nicolas Lehuen nicolas.lehuen at gmail.com
Thu Oct 20 14:29:42 EDT 2005

2005/10/20, Jim Gallacher <jg.lists at sympatico.ca>:
> Juan Carlos wrote:
> > Hello everybody, I'm trying to redirect to a page inside my site with
> > the internal_redirect method of the request. It redirects well but it
> > doesn't update the URL at the browser, so for example if i save a record
> > in a CRUD application and after saving it i redirect to the detail page,
> > the browser remains with the save URL.
> >
> > any suggestions?
> >
> Don't use internal_redirect. It only changes the url apache uses for
> processing the request and the browser will not be aware of this change.
> The only way to do it is to send the browser a response with a 3xx (eg
> 302) status code. Of course this means that the browser will need to
> perform an additional GET or POST.
> Regards,
> Jim

You can use mod_python.util.redirect to do exactly that, see :


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20051020/9628f8b8/attachment.html

More information about the Mod_python mailing list