Dynamic url routing

38 views
Skip to first unread message

kamala kotha

unread,
Apr 18, 2018, 2:13:24 PM4/18/18
to web2py-users
routes_in = (
                       ('/(?P<app>[\w]+)(?P<any>.*)', '/myapp\g<any>?client=\g<app>'),
)

user will have to see the same url they had entered.
so how should i have the routes_out so that outgoing url is same as incoming url. Is there a way to access the dynamic prefix entered by user in the routes_out?

routes_out = ('myapp(?P<any>.*)',  outgoing url?? )



              

Massimo Di Pierro

unread,
Apr 24, 2018, 5:58:03 PM4/24/18
to web2py-users
no

Anthony

unread,
Apr 25, 2018, 10:47:24 AM4/25/18
to web2py-users
As Massimo noted, you won't be able to use routes_out for that, but you can get the complete originally request URL via request.env.web2py_original_uri.

Anthony
Reply all
Reply to author
Forward
0 new messages