redirecting domain

36 views
Skip to first unread message

Vlad

unread,
Jun 20, 2019, 3:44:49 PM6/20/19
to web2py-users
what's the most efficient way to redirect domain to another domain entirely on a level of web2py?


Dave S

unread,
Jun 21, 2019, 2:36:14 AM6/21/19
to web2py-users


On Thursday, June 20, 2019 at 12:44:49 PM UTC-7, Vlad wrote:
what's the most efficient way to redirect domain to another domain entirely on a level of web2py?

That depends on which efficiency you are after.

Do you want the move to be in the browser history?  Then use the redirect(call).

If you don't need the move to be in the browser history, and want the fastest response,
call the other domain's functions from your current domain's app.
(You could probably still make back- and forwards- history work with javascript,
which I think some SPAs make use of.)

If you didn't need the current domain to do anything with the request, then the global (er, top-level) routes.py may be able to help.

/dps

Reply all
Reply to author
Forward
0 new messages