Read: http://web2py.com/books/default/chapter/29/4#URL-rewrite
Take a look to the router.py in web2py root folder, to use it you have to
rename it to routes.py
1.
2.
3.
4.
5.
6.
7.
8.
routers = dict(
BASE = dict(
domains = {
'domain1.com' : 'app1',
'domain2.com' : 'app2',
}
),
)
2012/2/1 Jim Steil <[email protected]>
> Hi
>
> 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<http://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
>
>
--
http://www.tecnodoc.com.ar