On Feb 16, 2011, at 5:04 PM, Jonathan Lundell wrote: > > On Feb 16, 2011, at 4:29 PM, Andrew Evans wrote: >> Hi ty for your help my routes in is just standard with example routes file >> >> >> routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'), >> (r'.*:/robots.txt', r'/examples/static/robots.txt'), >> ((r'.*http://otherdomain.com.* (?P<any>.*)', >> r'/app/ctr\g<any>'))) > > > You'll need to pick default application. If it's dojo, something like this. > This is *not* tested. It assumes that you're supporting accesses to dojo, > musico and admin, and that your favicon and robots files are in dojo's static > folder, as shown.
It occurred to me later that web2py is interpreting index.php as an app or controller (basically a syntax error) and that this is happening before an app is determined. So a */* entry for error handling is important. > > routes_in = ( > ('/favicon.ico', '/dojo/static/img/favicon.ico'), > ('/robots.txt', '/dojo/static/robots.txt'), > ('/?', '/dojo/default/index'), > ('/(?P<app>(admin|dojo|musico))','/\g<app>'), > ('/(?P<app>(admin|dojo|musico))/$anything','/\g<app>/$anything'), > ('/$anything','/dojo/$anything'), > ) > > routes_out = ( > ('/(?P<app>(admin|musico))/$anything','/\g<app>/$anything'), > ('/dojo/default/index/','/'), > ('/dojo/$c/index/','/$c'), > ('/dojo/$anything','/$anything'), > ) > > A simpler version with no shortening of URLs: > > routes_in = ( > ('/favicon.ico', '/dojo/static/img/favicon.ico'), > ('/robots.txt', '/dojo/static/robots.txt'), > ) >