Hi Jonathan, In fact I'm already wrapping URL to handle some other special behavior.
I'll check all suggestions, and will post back Thanks again!, Carlos On Wednesday, March 14, 2012 9:07:25 AM UTC-6, Jonathan Lundell wrote: > > On Mar 14, 2012, at 7:53 AM, Carlos wrote: > > I do need to generate some URLs as absolute, pointing to other > sub/domains, i.e. not relative to the current sub/domain, will this be a > problem?. > > > The problem lies in deciding whether to include the subdomain name in > outgoing URLs (that is, URLs that might be presented by the requesting > browser). You could wrap URL, I suppose, and edit your outgoing args based > on the incoming (sub)domain. Wrapping URL is a little tricky, though, since > it has some many arguments that are used in sometimes-subtle ways. > > > Thanks very much ! > > > On Wednesday, March 14, 2012 8:39:55 AM UTC-6, Anthony wrote: >> >> Another approach would be to use the parametric router, setting the >>> defaults to app/web/site, and in the model extract the subdomain from >>> request.env and prepend it to request.args. >>> >> >> I like that approach too. >> >> >>> Notice that the routes_out editing (or the equivalent in the parametric >>> case) is tricky, because it depends on the domain that the browser used to >>> access the site. If the request came in as domain.com/.../DEMO/..., you >>> can't remove DEMO in routes.out. OTOH, if the request was made to >>> DEMO.domain.com/..., then you must remove DEMO from the outgoing URL. >>> If it's there in the first place. >>> >> >> Yes, I was assuming outgoing URLs would be relative (i.e., no host >> included) and intended for inclusion on pages accessed via sub-domain URLs >> (e.g., demo.domain.com). >> >> > >