On 29 Aug 2012, at 8:13 AM, peter <peterchutchin...@gmail.com> wrote: > I am not sure what docs you are referring to Jonathan. The book gives an > example: > "The general syntax for routes is more complex than the simple examples we > have seen so far. Here is a more general and representative example: > > 1. > 2. > 3. > 4. > routes_in = ( > ('140\.191\.\d+\.\d+:https://www.web2py.com:POST /(?P<any>.*)\.php', > '/test/default/index?vars=\g<any>'), > ) > " > that seems to imply the URL is a string. It would be useful if one could see > the URL presented to routes_in.
A little below that is the general structure of the incoming pattern. '[remote address]:[protocol]://[host]:[method] [path]' So I think you'd want something like: '.*://localhost:.* [path] > > Let me ask the second part of my initial post slightly revised. > > I would like, within routes_In to be able to route according to domain name. > > > > So what would routes_in look like to route > > 127.0.0.1:8002 to welcome, and > > localhost:8002 to admin > In the long run, what are you really trying to accomplish with your routes? --