I have a ColdFusion application. I would like to be able to run the same codebase (rather than duplicate it) against multiple domains or subdomains. Each of the sites would be essentially the same, except that they would be branded, skinned and have different titles, etc.
So, what I'm looking for is how to have: www.abc.com and www.xyz.com and beta.mycompany.com all running off same codebase. Ideally, it will be quick to add new domains as new clients sign on.
I've seen this question for PHP and Rails, but not CF. Here is what I was thinking (and it seems to work), but was wondering if there are would be performance issues or a cleaner suggestion.
IN APPLICATION.CFC
<cfif cgi.server_name EQ "www.abc.com" >
<cfset request.client_id=1>
<cfelseif cgi.server_name EQ "www.xyz.com">
<cfset request.client_id=2>
... etc
<cfelse>
This application not configured.
<cfabort>
</cfif>
Now, just key everything off client_id...