Sorry if I didn't explain this well...
Imagine a scenario of a web company..

The company website is in the main app
The clients sites are in different apps like client1, client2, etc

In routes.py you redirect the domain to the respective app (ex.
client1.com -> client1)

The problem is that from client1.com you still able to access other
clients through the link http://client1.com/client2/default/index

This is bad because client1 just want his website on his domain.

Did I make myself clear this time?


On May 24, 2:06 am, Bruno Rocha <[email protected]> wrote:
> I guess Francisco wants to explain a different behaviour.
>
> Having 2 or more apps on the same web2py instance, web2py should prevent the
> app to be requested by other domain than its own domain.
>
> www.app1.com-> /app1  #allowedwww.app2.com-> /app2  #allowed
>
> www.app1.com/app2-> /app2 # deniedwww.app2.com/app1-> app1 # denied
>
> I agree with him, sometimes search robots finds apps under different
> domains...
>
> --
> Bruno Rocha
> [ About me:http://zerp.ly/rochacbruno]
>
> On Mon, May 23, 2011 at 9:40 PM, Jonathan Lundell <[email protected]>wrote:
>
>
>
>
>
>
>
> > On May 23, 2011, at 6:10 PM, Francisco Costa wrote:
>
> > > The URL calling is fine.. the problem is how web2py manages different
> > > apps from different domains/subdomains
>
> > > I really believe that they should be improved!
>
> > web2py (URL) isn't generating a domain *at all* in the URL unless you
> > explicitly specify one; the domain is normally provided by the browser, and
> > that's how it should be, at least by default. If you want to override the
> > domain the browser is using, you need to do it explicitly.
>
> > > On May 23, 11:02 pm, Jonathan Lundell <[email protected]> wrote:
> > >> What's your URL() call for the example below? Have you looked at the
> > HTML? I wouldn't expect to see a domain there at all.
>
> > >> On May 23, 2011, at 12:00 PM, Francisco Costa <[email protected]>
> > wrote:
>
> > >>> Hello,
> > >>> I have a main app and a blog app
>
> > >>> My routes.py are like this:
> > >>> routers = dict(
> > >>>    BASE = dict(
> > >>>        default_application = 'main',
> > >>>        default_controller = 'default',
> > >>>        default_function = 'index',
> > >>>        domains = {
> > >>>            "domain.com" : "main",
> > >>>            "blog.domain.com" : "blog",
> > >>>        }
> > >>>    )
> > >>> )
>
> > >>> While I'm browsing through the subdomain "blog.domain.com" I have some
> > >>> links that point to the main app.
> > >>> Those links are generated like this:
> > >>>http://blog.domain.com/main/test
>
> > >>> If I click on it it works, but I would like the link to be generated
> > >>> as
> > >>>http://domain.com/main/test
>
> > >>> This is bad because 2 different domains urls shouldn't target the same
> > >>> page and it also duplicates data which is bad for SEO
>
> > >>> Any help?

Reply via email to