On 25 Oct 2013, at 2:09 AM, António Ramos <[email protected]> wrote:
> 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!
Your re's aren't quite right, and you should be defining routes_in, not
routes_app (routes_app is used only if you have separate, app-specific
routes.py files).
This is closer, though untested:
routes_in = (
(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'/welcome/$anything')
>
>
> 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 <[email protected]>
> 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
> 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 [email protected].
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.