setBaseURL ignored

I’ve set up a new system; running Lucee 5.2.9.31; Tomcat 8.5.35 and Coldbox 5.1.1 (it’s actually still the latest on https://www.coldbox.org/download; I think 5.2 is the most recent version?)
I’m experiencing a weird problem when I use event.buildLink(“xxx.yyy”).

In Router.cfc; I did a setBaseURL("/"). Idea ist, that an URL returned by event.buildLink should always be absolute; starting with just a “/”
The URL returned always contains the complete path including http://…

Router.cfc looks like this:

`

component{

function configure(){
setFullRewrites( true );

setBaseURL("/");
route( “:handler/:action?” ).end();
}

}

`

Problem is that I’ve set up the system with Microsoft Application Request Routing (not BonCode). An incoming request (Port 80) ist forwarded to the same URL but with Port 8888. This port is then also taken by event.buildLink. Therefore links will be broken because they link to port 8888 (which does not work from outside)

You can see my example here: http://ht01.rename.ch

I will
Check jurg to reproduce.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057

– -- You received this message because you are subscribed to the Google Groups “ColdBox Platform” group. For News, visit For Documentation, visit For Bug Reports, visit — You received this message because you are subscribed to the Google Groups “ColdBox Platform” group. To unsubscribe from this group and stop receiving emails from it, send an email to . To post to this group, send email to . To view this discussion on the web visit . For more options, visit .

Thanks, Luis
On page Application Router - ColdBox HMVC Documentation it sais

Tip: Unlike previous versions of ColdBox, the new routing services in ColdBox 5 are automatically configured to detect the base URLs and support multi-domain hosting. There is no more need to tell the Router about your base URL.

I hope that doesn’t mean that “setBaseURL” is ignored…?

Juerg, the problem is the full rewrites. If you use setFullRewrites() it bypasses the base URL. SO just eliminate the full rewrites, since you want control.

I’ve already tried this - doesn’t work

Same effect whether I do a
setFullRewrites(true)
or
setFullRewrites(false)
or leave it away.

I always get the whole URL back…
Right now it’s “setFullRewrites(false)” on my demo-page (I’ve coloured it red; it’s the output from Event.buildLink(“user.checkLogin”)

Ok, I see the issue. Let me see how to deal with it.

Ok, https://ortussolutions.atlassian.net/browse/COLDBOX-753

I have created an issue and it is now building for the BE. You will now have a new setter config:
setMultiDomainDiscovery( boolean )

You were right, as of now, you could not turn off multi domain discovery. It is turned on by default, so you will need to turn it off. Also, make sure set full rewrites is TRUE, because that eliminates the index.cfm in the URL.

Thanks!

not quite => probably a caching issue?

My Router.cfc now looks like this:

`

component{

function configure(){
setFullRewrites( true );
setBaseURL("/");
setMultiDomainDiscovery ( false );
route( “:handler/:action?” ).end();
}

}

`

If I restart Tomcat/Lucee, the very first call to Event.buildLink(‘user/checkLogin’) returns “/user/checkLogin” => great!
But - if I reload the page, I get index.cfm?event=user/checkLogin (at least without “http://ht01.rename.ch:8888” but still wrong)

If I set “setMultiDomainDiscovery(false)”; I get (as before) http://ht01.rename.ch:8888/user/checkLogin