Hi Massimo, thanks a lot for your quick reply. I need the domain/hostname in the second part of routes_in. I can't hard code the domain name because of out build system. routes_in have to use the current domain or some kind of wildcard.
Is there any way? Thanks again. On May 10, 3:57 am, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > It depends. You can > dohttp://web2py.com/book/default/chapter/04?search=routes#Pattern-Based... > > routes_in = ( > ('140\.191\.\d+\.\d+:https://www.web2py.com:POST/(?P<any>.*)\.php', > '/test/default/index?vars=\g<any>'), > ) > > You can have regex in pattern for hostname > > On May 9, 3:45 pm, Dan <d...@imojo.de> wrote: > > > > > Hi, > > > is there any way to get the current domain in routes.py? The request > > object is not defined in routes.py. > > > The reason for this is that I want to build some links over https with > > routes_out. Since you have to give a full URL as the second parameter > > I need to prepend the domain. > > > Thanks a lot for any help.