i'm pretty sure there is a section in the book that covers this topic
exactly. there is also new versions of routing since i last wrote this.
anyhow, my routes info:
routes_in = (('/admin(?P<f>.*)', '/admin$f' ), #make the admin app work
('/','/ec'), #/ goes to the ec app
('.*:/favicon.ico','/ec/static/images/favicon.ico'), #fav icon
for all things on this server
('/$c/(?P<f>.*)', '/ec/$c/$f'), # remove the leading /ec from
our URLs
('/$c', '/ec/$c')) #remove leading /ec, don't require a
function name (default to index)
routes_out = (('/admin/(?P<f>.*)', '/admin/$f' ), # don't rewrite admin
links
('/$a/static/(?P<f>.*)', '/$a/static/$f'), #don't rewrite
static links
('/$a/$c/index.html', '/$c/'), # removing leading /ec, and the
index function if there are no params
('/$a/$c/index', '/$c/'), # removing leading /ec, and the
index function if there are no params
('/$a/$c/(?P<f>.*)', '/$c/$f')) # remove leading /ec
note that your routes_out must remove the application from the URL generated
by URL() for it to work. "ec" is my application name in this example. you
may also wish to look at the more recent updates to the routing mechanism,
they might be easier to use - i don't know myself yet.
cfh