External HTTP redirection

19 views
Skip to first unread message

Joe Tseng

unread,
May 9, 2008, 11:02:14 AM5/9/08
to cherrypy-users

I'm trying to do an external redirection with no success.  Everything I've found using Google points to internal redirection, and I want to have external redirection so I'd have GET values in my URL.  Could someone perhaps clue me in?

Joe

unread,
May 9, 2008, 1:28:00 PM5/9/08
to cherrypy-users
Found it... For anyone else who comes across this problem this is
what I did:

from cherrypy.lib import cptools
cptools.redirect(url='./your_url?your_param=somevalue',internal=False)

Jason Earl

unread,
May 9, 2008, 10:28:03 PM5/9/08
to cherryp...@googlegroups.com
"Joe Tseng" <jtse...@gmail.com> writes:

In CherryPy 3.0 and up you can do something like:

url = cherrypy.request.base + "?errormsg=Not%20Logged%20In"
raise cherrypy.HTTPRedirect(url)

I am not sure if this works in earlier versions though.

Jason

Reply all
Reply to author
Forward
0 new messages