# -*- coding: utf-8 -*-
routes_app = (
(r'.*?:https?://www.site1.pt:\w* /$anything', r'site1'),
(r'.*?:https?://www.site2.pt:\w* /$anything', r'site2')
)
Did you try to set up you routes.py file? Do you have a specific problems / error messages? Can you show us some code?
routers = dict( BASE = dict( default_application='vtraffic', default_controller='default', root_static = ['favicon.ico', 'robots.txt', 'google51a05a100c482cad.html', 'sitemap.xml'], domains = {'traffic.integreen-life.bz.it':'vtraffic', 'parking.integreen-life.bz.it':'parkbz'} ), vtraffic = dict(languages=['en', 'it', 'de']), parkbz = dict(languages=['en', 'it', 'de']),)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/rzxeYXHalgI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
So, you have define your base "routes.py" on web2py folder.Then, do you have set up an app-specific routes.py in your application folder?
I dont get it.i tried this with no successi created an empty routes.py file in my web2py folderthen inside i wrote# -*- coding: utf-8 -*-routes_app = ((r'.*?:http?://www.cires.pt:\w* /$anything', r'welcome'),(r'.*?:http?://apps.cires.pt/empre:\w* /$anything', r'empre'),(r'.*?:http?://apps.cires.pt/erp:\w* /$anything', r'welcome'))the last tuple i wrote to test if http?://apps.cires.pt/erp would redirect to the welcome app. It did not!
routes_in = ((r'.*?:https?://www\.cires\.pt:.* /$anything', r'/welcome/$anything'),(r'.*?:https?://www\.previnil\.pt:.* /$anything', r'/previnil/$anything'),(r'.*?:https?://apps\.cires\.pt:.* /empre/$anything', r'/empre/$anything'),(r'.*?:https?://apps\.cires\.pt:.* /erp/$anything', r'/erp/$anything'))the bold route does not route to previnil app but to welcome!!!Why?
--
yeswith the bold line commented out i stil go to welcome when i write in my browser http://www.previnil.ptis that because welcome is the default app?
yes i reload the routes on every change to routes.pybut how do i route to previnil app when i write http://www.previnil.pt ???I have my 2 dns pointing to my web2py server (www.cires.pt and www.previnil.pt)
routes_in = ((r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'),(r'.*?:https?://www\.cires\.pt:.* /$anything', r'/welcome/$anything'),(r'.*?:https?://apps\.cires\.pt:.* /empre/$anything', r'/empre/$anything'),(r'.*?:https?://apps\.cires\.pt:.* /erp/$anything', r'/erp/$anything'))the bold line redirects to welcome app
(r'.*?:https?://www\.previnil\.pt:.* /$anything', r'/previnil/$anything'),
i tried(r'.*?:https?://www\.previnil\.pt:.* /$anything', r'/previnil/$anything'),(r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'),none of them redirectedall other routes are not working also because i changed them to redirect to other app and it did not!is as if routes.py didnd exist. However if i make a mistake in the code on purpose when i reload route i got a ticket.So routes.py is being read but not working as expected.
--
sorry but dont know how to turn on rewrite logging
--