On Mon, Mar 1, 2010 at 03:47, Elam Watkins <elamwatk...@gmail.com> wrote: > I downloaded web2py version 1.75.5. I then renamed the welcome > application to init. > > I want to remove the application prefix from the application's URLs > because I want to only expose one application. I created a routes.py > in the web2py folder and tried the following: > > #--------------------------------------------- > routes_in = ( > ('/testme', '/init/default/index'), > ) > routes_out = ( > ('/init/default/index', '/testme'), > ) > #--------------------------------------------- > > It worked fine. > > I then tried > > #--------------------------------------------- > routes_in = ( > ('/(?P<any>.*)', '/init/ any>'), > ) > routes_out = ( > ('/init/(?P<any>.*)', '/ any>'), > ) > #---------------------------------------------
There is some typo in the online book. You should use "\g". See [1] for one example (/docs). > and this: > > #--------------------------------------------- > routes_in = ( > ('/$c/$f', '/init/$c/$f'), > ) > > routes_out = ( > ('/init/$c/$f', '/$c/$f'), > ) > #--------------------------------------------- Try this: routes_in = ( ('/', '/init'), ('/$c/?', '/init/$c'), ('/$c/$f', '/init/$c/$f'), ) routes_out = ( ('/init/$c/$f', '/$c/$f'), ) [1] http://web2py.com/AlterEgo/default/show/67 > Neither worked. This is straight from the book: > http://web2py.com/book/default/section/4/15 > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- Álvaro Justen - Turicas http://blog.justen.eng.br/ 21 9898-0141 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.