On Jun 22, 2012, at 3:08 AM, Alec Taylor wrote:
> 
> My web2py\routes.py:
> 
> routers = dict( BASE=dict( default_application='social',
> default_controller='default', default_function='index' ) )
> myapps = ['social']
> routes_in = [
>  ('/admin/$anything', '/admin/$anything'),
> ]
> for app in myapps:
>    routes_in += [ ('/%s/static/$anything' % app,
> '/%s/static/$anything' % app), ('/%s/appadmin/$anything' % app,
> '/%s/appadmin/$anything' % app), ('/%s/$anything' % app,
> '/%s/default/$anything' % app) ]
> routes_out = [(b, a) for (a, b) in routes_in]
> 
> It correctly defaults the landing page to the 'social' app, but it
> isn't removing 'default' from my URLs.
> 
> (I got the above from
> https://groups.google.com/forum/#!topic/web2py/QU71v2-GFaM)
> 
> How can I remove 'default' from my URLs?
> 
> Thanks for all suggestions,

Don't mix the two routers. In particular, don't define routers if you're going 
to define routes_in/out.

All you need is:

routers = dict(
    BASE = dict(
        default_application = 'social',
    ),
)

-- 



Reply via email to