oops ((r'.*http://www.previnil.pt.* (?P<any>.*)', r'/previnil/default\g<any>')),
is not working. It defaults to /welcome/ why? 2013/10/25 António Ramos <ramstei...@gmail.com> > it works now > in my web2py folder i created this routes.py > > routes_in = ( > ((r'.*http://www.cires.pt.* (?P<any>.*)', r'/welcome/default\g<any>')), > ((r'.*http://apps.cires.pt/empre.* (?P<any>.*)', > r'/empre/default\g<any>')), > ((r'.*http://apps.cires.pt/ERP.* (?P<any>.*)', r'/ERP/default\g<any>')), > ((r'.*http://apps.cires.pt/DO.* (?P<any>.*)', r'/DO/default\g<any>')), > ((r'.*http://www.previnil.pt.* (?P<any>.*)', > r'/previnil/default\g<any>')), > > > ) > > IT works! > > > > 2013/10/25 Loïc Espern <loic.esp...@gmail.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? >> >> For example, in welcome app you should have a routes.py file containing >> something like (just a stupid example from one of my apps) : >> >> # -*- coding: utf-8 -*- >> routes_in = ( >> (r'/whatever', r'/welcome/default/whatever'), >> (r'/contact', r'/welcome/default/contact_form'), >> (r'/robots.txt', r'/welcome/static/robots.txt'), >> ) >> >> routes_out = [(x, y) for (y, x) in routes_in] >> >> >> 2013/10/25 António Ramos <ramstei...@gmail.com> >> >>> I dont get it. >>> >>> >>> i tried this with no success >>> i created an empty routes.py file in my web2py folder >>> then 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! >>> >>> >>> I think this routes.py is being ignored. >>> Also i think i dont get it how to use routes.py >>> >>> Thank you for your info >>> >>> >>> 2013/10/25 Paolo Valleri <paolo.vall...@gmail.com> >>> >>>> I've this setup on a server: >>>> 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']), >>>> ) >>>> >>>> >>>> hope it helps >>>> Paolo >>>> >>>> >>>> On Thursday, October 24, 2013 11:19:05 PM UTC+2, Loïc wrote: >>>>> >>>>> Considering my previous post, and the routes documentation : >>>>> http://www.web2py.com/books/**default/chapter/29/04/the-** >>>>> core?search=routes#Routes-on-**error<http://www.web2py.com/books/default/chapter/29/04/the-core?search=routes#Routes-on-error> >>>>> >>>>> Did you try to set up you routes.py file? Do you have a specific >>>>> problems / error messages? Can you show us some code? >>>>> >>>> -- >>>> 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+unsubscr...@googlegroups.com. >>>> >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> -- >>> 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 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+unsubscr...@googlegroups.com. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> 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+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.