I cannot reproduce -- for me, redirect('http://www.web2py.com') redirects
to www.web2py.com as expected. When you call redirect('some_url'), web2py
issues a 303 response with the "Location" HTTP header set to 'some_url' --
the client is then responsible for redirecting to that URL.
Are you by any chance calling the members() function via Ajax?
Anthony
On Monday, April 30, 2012 6:23:40 AM UTC-4, Hassan Alnatour wrote:
>
> Dear ALL ,
>
> I am trying to use redirect like this :
>
> def members():
> if request.vars.fb == "1":
> redirect('http://www.web2py.com')
>
> users = db().select(db.users.ALL,orderby=~db.users.Placeorder)
> return dict(users=users)
>
>
> but it keep taking me to my website index page or gives me the link like
> this : www.mydomain.com/thelink !!
>
>
> What to do ?
>
> Best Regards,
>