Since you are talking about shared hosting I assume you are using a
third party like a web server, for example apache.
If you have multiple installation your web server (apache) needs
somehow to be able to discriminate which one you one you want to talk
to. This can be done using the hostname (different virtual hosts), via
appname (/app1/default/index go to web2py1 and /app2/default/index
goes to web2py2), or by prepending a prefix to the appname (/web2py1/
app/default/index goes to web2py1 and /web2py2/app/default/default/
index goes to web2py2).
In all of these cases routes can be used to add or remove parts of the
url received by web2py.
If you have a single application a single web2py installation you can
do
routes_in=(('/index','/myapp/default/index'),)
to do the mapping you ask.
Massimo
On Sep 13, 5:00 pm, Jon Romero <[email protected]> wrote:
> I am writing a tutorial on how to install web2py on shared hosting
> acounts.
> I have managed to install and use it successfully but I have a problem
> with routes.
>
> So, I have created a domain pointer to /home/myuser/www/web2py
> (yeap I know I should put web2py outside of public but this senario
> will make it easier to explain the pointer).
>
> Then I created a dispatcher and an .htaccess and everything works
> lovely.
> When I go to my domain pointer, I get redirected
> to:http://mydomain.com/welcome/default/index
>
> This creates two problems:
> 1. What if I have two (or more) websites/applications using the same
> web2py installation?
> Is it possible?
> 2. My links are now like
> that:http://mydomain.com/application_name/default/index
> while I wantedhttp://mydomain.com/index.
> This seems like a route.py problem, but what happens if there are two
> websites/applications?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---