is it possible to set different BaseURL's based on environment?
yes, you will have to intercept at preProcess() and override the base URL for that request via the event request context object:
You can also look at forgebox, there is already a multi domain interceptor there.
Luis F. Majano
Ortus Solutions, Corp
I am not sure that I follow can you post an example?
is it like this
i can't get my sample-app running on coldbox 3 m5, when placing it
in a different root folder ... :
i tried all kind of settings in Application.cfc with relative & absolute paths
last setting says "can't find modules.forgebox.ModuleConfig".
or Error Messages: invalid component definition, can't find handlers.Main
<cfset COLDBOX_APP_ROOT_PATH = '/webdata/domain.com/htdocs/db-app/'>
<cfset COLDBOX_CONFIG_FILE = "/db-app/config/Coldbox.cfc"> (with a cf-mapping on /db-app)
i also tried the other way around without success:
running the APP in "normal" folder-structure works correct and painless.
Like this in an interceptor:
<cffunction name="preProcess" access="public" returntype="void"
hint="Executes before any event execution occurs" output="false" >
// set the base URL according to domain or whatever strategy you like.
arguments.event.setSESBaseURL("http://" & cgi.http_host & "/index.cfm");