ColdBox/coldbox-platform — Issue #58: buildLink creating issue with multiple domain pointing to same application.
Author: thecfguy
Created: 2011-11-11 07:50:44+00:00
State: open

I am not sure this is an issue or I am using buildLink in wrong way. I have coldbox application which is pointed by two domains (e.g www.abc.com and www.xyz.com) also I am using SES for this application.

Now in everywhere in system I have use event.buildLink([event name]) function to generate link and submit URL. Now issue is if I am visiting site first time with www.abc.com or reinit framework from domain www.abc.com then buildLink function create URL start with domain www.abc.com no matter from which domain I am accessing website.

For Ex.
I have code event.buildLink("page.index") which create following URL for both domain

For domain www.abc.com >>>> http://www.abc.com/page/index
For domain www.xyz.com >>>> http://www.abc.com/page/index ( I was expecting http://www.xyz.com/page/index )

I know it appending SESBaseURL which store in application variable and both domain share same application variable.
I am able to overcome this issue by creating different application name for both domain.

But want to make sure the way I am doing it is correct?

Thanks
Pritesh (@thecfguy)