Thank you very much!

Here's the feedback, I've tried both your suggestions.

Massimo's solution works if there is only default.py. Other controller
routes are not possible.

Anthony's solution is very neat. Although you can't have a controller
going by the name of a function in default.py. I think this is a
reasonable solution.

Appreciate the replies and help!

On Nov 28, 10:38 pm, Anthony <abasta...@gmail.com> wrote:
> Look at router.example.py in the /web2py root folder. I think this should
> do it:
>
> routers = dict(
>     BASE = dict(
>         default_controller = 'default',
>         default_function = 'index'
>     )
> )
>
> Goes in routes.py, which goes in the /web2py root folder.
>
> Anthony
>
>
>
>
>
>
>
> On Monday, November 28, 2011 9:27:04 AM UTC-5, lyn2py wrote:
>
> > I would like to add that other than index function, I wish to map
> > >> localhost/app/default/any_function
> > to
> > >> localhost/app/any_function
>
> > Thank you!
>
> > On Nov 28, 5:47 pm, lyn2py <lyn...@gmail.com> wrote:
> > > I know routes.py has been brought up many times, but I haven't been
> > > able to get it to work for me.
>
> > > Here's what I want to do:
> > > I would like to remove "default" from the URL in>>
> > localhost/app/default/index
>
> > > so that it appears as
>
> > > >> localhost/app/index
>
> > > I have referenced the posts in google groups and athttp://
> > web2py.com/book/default/chapter/04#URL-Rewrite
>
> > > I have reloaded routes in the admin before testing.
>
> > > Where should I put routes.py and what code should I put inside it to
> > > make this work?
>
> > > Thanks!

Reply via email to