0

I am using the routes package with pylons for my application. Recently, I have another domain which I want to use for some parts of my application.

Can I setup routing.py with domain conditions as well? Something like -

map.connect('/reviews/', controller = 'reviews', action = 'list', conditions=dict(domain = ['new_domain.com']))

I know we can do this for subdomains. I want to know if we can do this with multiple domains as well. So requests coming from different domains to your application can be routed accordingly.

Siddharth
  • 5,009
  • 11
  • 49
  • 71
  • possibly of use: http://stackoverflow.com/questions/7622961/defining-sub-domain-based-on-a-function-in-routes-py-of-web2py - however, I would tend to look at my front-end server doing the work and just delivering it to the app (perhaps introducing some form of header into the request)... – Jon Clements Dec 27 '12 at 08:55
  • I am not familiar with that, but just think about if such usage is better handled by a proxy like Nginx or ask yourself why. – CppLearner Dec 27 '12 at 09:21

0 Answers0