I am still having issues with this on 2.9.12. Here is my routes.py:
BASE = '/web2py'
routes_in = (
(BASE + '/$anything', '/$anything'),
)
routes_out = [(x, y) for (y, x) in routes_in]
In this case, if I try to go to an admin url (like /web2py/admin/debug) and I am not logged in as admin, on the user login page, the hidden POST field "send" is set to redirect me to /admin/debug:
<input type="hidden" name="send" value="/admin/debug/"/>
This happens with the Error 500 page and Ticket link generator as well.
I tried looking in admin's appadmin.py and default.py controllers and could not find why either send=URL('site') or redirect(URL('admin','default','index',vars=dict(send=URL(args=request.args, vars=request.vars)))) is not picking up the correct routing and prepending the rendered URL with my BASE ('/web2py')