RE: [contentbox-version] Re: Problem with the admin and url of web site

I don’t know what you mean by development. This setting/interceptor has nothing to do with development and everything to do with the base URL used to build all links.

If you want the base URL of your app to be the same regardless of how it was reinitted, take this code in your /config/routes.cfm:

// Base URL
if( len(getSetting(‘AppMapping’) ) lte 1){

and replace cgi.HTTP_HOST with the domain you want.

The behavior may be unexpected and even a little annoying, but it’s not a bug-- it’s just how the SES interceptor has always worked.

Here’s a link to the multi-domain interceptor (basically like what I pasted in) which is what you need to use if you want to use your site on multiple domains.

I’m honestly not sure why this preProcess() methd isn’t just part of the SES interceptor with a setting to turn it on or off. Actually, I’d like to see the three optional settings added to SES:

determineBaseURL=‘auto’; // Detect each request (What I think the default should be)
determineBaseURL=‘reinit’; // use whatever the application is reinitted with (current default)
determineBaseURL=‘’; // override to always use

This would remove the need for the multi-domain SES since the regular SES interceptor could be configured to do whatever you wanted.

An Assembla ticket should probably be raised to see about this enhancement unless Luis can provide some background on why it is the way it is.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

In my message above here is what I noticed, in development if I browse my site with then the base url is set to o when I try to browse it from another machine using the machines ip, it spits the dummy now the problem is that is what is happening on my live site when I reinit the application. The first call to the site when this happens gets to set the base href.

This is not ideal in any way shape or form, especially when in development and there can be a machine with a number of users maybe looking at it.

Wordpress you specify the URL of the server and it is stored in the database, and doesn’t suffer this problem because it grabs that and uses it as the base href.

Does that make the problem clearer?

Follow the steps above with the two devices to see the problem.

And yes I am aware of the solution you provided below, that is how I fixed the www problem in the first place. The fact that this is set on the first call to the server, is not an ideal solution for the wild or for development.