routes_app is used to tell the routing system which applications have their own application specific routes.py (in the application folder rather than the web2py root folder). I think you want to use routes_in (probably with a matching routes_out) instead. See http://web2py.com/books/default/chapter/29/4#Pattern-based-system.
Anthony On Wednesday, August 29, 2012 7:44:13 AM UTC-4, peter wrote: > > I will try this post again, unfortunately I did not have a copy > > I tried this example routes.py > > #!/usr/bin/python > # -*- coding: utf-8 -*- > routes_app = ((r'/(?P<app>welcome|admin|app)\b.*', r'\g<app>'), > (r'(.*)', r'myapp'), > (r'/?(.*)', r'myapp')) > > I restarted the server > web2py uses port 8002, on a windows 7 machine. > > As I understand the example it should allow apps welcome admin and app, > but for other apps it should revert to 'myapp'. > > 127.0.0.1:8002/welcome starts the welcome app as it should > > 127.0.0.1:8002/gallery starts the gallery app, so the routing does not > appear to be working. > 127.0.0.1:8002 starts the welcome app, so the routing does not appear to > be working. > > Does anyone have any ideas why it is not working. If I put a syntax error > in then this gets flagged up, so it is being loaded. > > I need to use pattern based routing within an app, so I need to get on top > of this. > > I would like, within routes_app to be able to route according to domain > name. > > So what would routes_app look like to route > > 127.0.0.1:8002 to welcome, and > > localhost:8002 to admin > > Thanks > > Peter > > > > > --

