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, Massimo Di Pierro wrote: > > 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, villas wrote: >> >> 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 routes.py >> >> All the best, D >> >> >> On Friday, 5 June 2015 20:00:29 UTC+1, Najtsirk wrote: >>> >>> 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']: >>>> redirect(URL('index')) >>>> >>>> -- 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/d/optout.