>
> url = URL('default', 'user', args='login', host=True, scheme=True) +
> "/%s/default/user/login" % request.application)
>
URL('default', 'user', args='login', host=True, scheme=True) alone will
produce http://yourdomain.com/yourapp/default/user/login, so there should
be no need to add "/%s/default/user/login" % request.application, which
will result
in http://yourdomain.com/yourapp/default/user/login/yourapp/default/user/login.
That will still work (the second /yourapp/default/user/login will just be
interpreted as a set of request.args and ignored by web2py), but no need
for it.
Anthony