On 27 Feb 2013, at 8:42 AM, greaneym <[email protected]> wrote:
> Thanks  for your help, Jonathan.
> 
> I'm not sure if this is the intended or best way to use this but 
> I looked in the manual more closely at absolute urls and this is what I added 
> to my menu to get to the other location hosted on a different physical host.
> On the models/menu.py file on host 1
> 
> (T('App3'),False,URL('appname1','default','index',scheme='http', 
> host='www.yyy-xxx.abc.com'))
> 
> On host2, I tried routes.py using routesin, routes out and then with a domain 
> assignment, but in both cases it still shows the absolute url.
> 
> Does the use of absolute URL for a redirect override the routes.py always?  I 
> will keep trying.

The parametric router, at least, performs its rewrites regardless of whether 
the resulting URL will be absolute. So if you're splitting the apps between 
hosts, and you want outgoing URLs to be rewritten, then I suppose it makes 
sense to put both apps in the router files on both hosts. You might also need 
to turn on the exclusive_domain flag, to guard against generating a 
non-absolute URL between apps.

> 
> On Tuesday, February 26, 2013 10:46:06 PM UTC-6, Jonathan Lundell wrote:
> 
> Generally speaking, to redirect to another host you need to pass the host as 
> an argument to URL(). The routes domain option won't help you here; it's for 
> routing to different apps on the local host.
> 


-- 

--- 
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.


Reply via email to