For Pylons 1.0 the following should work - I'm assuming a controller action. If this is the case you can set-up the following imports in the controller file
from pylons import url from pylons.controllers.util redirect Then within the controller action return the redirect def TestController(BaseController): def test_redirect(self): return redirect(url('http://www.cnn.com')) On Oct 4, 9:11 pm, Ryan <ryan.mckil...@gmail.com> wrote: > Hmmm... seems like a lot of work to set up a route just to do a > redirect. The URL I want to redirect to is absolute, but it's actually > on my domain, so guess I'll just use a regex to put it in relative > form. > > On Oct 4, 2:22 pm, Gael Pasgrimaud <g...@gawel.org> wrote: > > > Hi, > > > Have you tried with a static route ? > > >http://routes.groovie.org/generating.html#generation-only-routes-aka-... > > > then: > > > redirect(url('google')) > > > -- > > Gael > > > On Mon, Oct 4, 2010 at 11:14 PM, Ryan <ryan.mckil...@gmail.com> wrote: > > > This: > > > redirect('http://www.website.com') > > > > Will redirect to: > > >http://www.myapp.com/http://www.website.com > > > > I'd like it to redirect to: > > >http://www.website.com > > > > Is there an addition argument I can pass to redirect to make it happen? > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "pylons-discuss" group. > > > To post to this group, send email to pylons-disc...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > pylons-discuss+unsubscr...@googlegroups.com. > > > For more options, visit this group > > > athttp://groups.google.com/group/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.