Did you restart your webserver / reload routes?

I use a similar routes.py for multiple domains and it works fine.
Maybe you could try : 

routers = dict(
  BASE  = dict(
      domains = {
            'www.domain1.com' : 'app1',
            'domain1.com' : 'app1',
            'www.domain2.com' : 'app2',
            'domain2.com' : 'app2',
      },
      applications=['app1', 'app2']
  ),
)





Le mercredi 1 mai 2013 14:54:34 UTC+2, Kenneth a écrit :
>
> I am using the routers.domains method to routing the applications to 
> domains, 
> I have a problem that I can access to the applications which are not 
> routed to the assigned domain.
>
> for example
>
> routers = dict(
>   BASE  = dict(
>       domains = {
>           'domain1.com' : 'app1',
>           'domain2.com' : 'app2',
>       }
>   ),
> )
>
>
> domain2.com still has the access to app1.
>
> Should I just block the applications when users request the unassigned 
> applications from the controller?
>
> Thank you
>
> On Wednesday, February 1, 2012 4:14:05 PM UTC-6, Jim S wrote:
>>
>> 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
>>
>> 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
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to