yes but not the anything wildcard, which is special. You can do it with
these two rules:
(https?://www.domain1.com:\w+ /$*a*', '/app1')
(https?://www.domain1.com:\w+ /$*a/*$anything', '/app1/$anything')
On Wednesday, 10 June 2015 05:25:02 UTC-5, Najtsirk wrote:
>
> If I understand that correctly
If I understand that correctly...that would mean I need to do these all
combinations for each domain/app?
Is it possible tu use a wildcard for the app part of the routes too?
Like: (https?://www.domain1.com:\w+ /$*anything*$anything',
'/app1$anything') ?
On Tuesday, 9 June 2015 00:35:58 UTC+2
I do not know about the router but you can with the pattern based routes.py
using the regex notation:
routes_in = (
(https?://www.domain1.com:\w+ /app2$anything', '/app1$anything'),
(https?://www.domain2.com:\w+ /app1$anything', '/app2$anything'),
)
On Monday, 8 June 2015 10:56:51 UTC-5, v
My suggestion does not answer your question, it merely suggests a
work-around.
In a model file e.g. models/0redirects.py (your first model) check the
domain and app name are correct. If not, redirect, or whatever you wish
to happen.
Hopefully, someone will provide an answer based on rout
Did you mean to put this into specific app?
This does not work, because router redirects to different app.
On Friday, 5 June 2015 17:17:48 UTC+2, villas wrote:
>
> Maybe something like this (untested)...
>
> --- in models/0redirects.py ---
> if request.application in ['app2','app3']:
> redir
Maybe something like this (untested)...
--- in models/0redirects.py ---
if request.application in ['app2','app3']:
redirect(URL('index'))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web
6 matches
Mail list logo