I've got a couple different apps I want to deploy under my web2py
instance on webfaction. Unfortunately, I'm well versed in routing and
knowing how to route different requests to different apps.
I have different urls that I'd like mapped to different apps.
www.application1.com I would like to point to
web2py/applications/application1
www.application2.com I would like to point to
web2py/applications/application2
And, if possible, I prefer to not show the application name in the url
-> www.application1.com/application1/controller/function
Controller and function are fine but would prefer to eliminate the
duplicate application1. If there is a spot in the manual I should study
harder, please reference it. Unfortunately, I'm relatively weak when it
comes to url rewriting/routing and regular expressions.
-Jim
1. |
routers = dict( |
Vasile - Thanks for the reply - However, with my aversion to regular expressions, I chose to use the solution that Martin provided.
routers = dict( BASE = dict( domains = { 'domain1.com' : 'app1', 'domain2.com' : 'app2', }
),
)
routers = dict(
BASE = dict(
domains = {
'www.domain1.com' : 'app1',
'domain1.com' : 'app1',
'www.domain2.com' : 'app2',
'domain2.com' : 'app2',
},
applications=['app1', 'app2']
),
)--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/1hSkZ4o99h4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.