One solution is to have a table of sub-domains that refer to the main 
application config table:  lookup "domain.com" or "blog.domain.com" or 
"www.domain.com" and find the parent config record for "www.domain.com".  
In that case, you can then add "dev.domain.com" to the sub-domain table, 
but you'd still have to have the dev.domain.com entry in your local hosts 
file for it to work.

----------------------------------------

From: "Rick Faircloth" <r...@whitestonemedia.com>
Sent: Thursday, February 24, 2011 8:01 AM
To: "cf-talk" <cf-talk@houseoffusion.com>
Subject: RE: I think I'm confused...

I could easily see that working for single sites,
but if I'm developing a "multiple sites, one codebase"
application that depends on reading specific domain
names for setting sites variables, that means I have
to have those dev.mydomain domains in the local hosts
file, as well.

I could just use the "mydomain" part of the url for
identification, but as someone pointed out earlier
in the MSOC discussion, that wouldn't account for
subdomains, if they're used, such as blog.mydomain, etc.

Any thoughts on this concern?

Rick

-----Original Message-----
From: Mike Kear [mailto:afpwebwo...@gmail.com] 
Sent: Thursday, February 24, 2011 6:04 AM
To: cf-talk
Subject: Re: I think I'm confused...

I use different domain names.  I have www.mydomain.com for the live
server site,  and dev.mydomain for my  local development sites

Then in my hosts file, i have the line:

127.0.0.1 dev.mydomain

for each client site i have.   With apache, the local dev versions and
remote server versions behave in an identical manner

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

On Thu, Feb 24, 2011 at 9:21 PM, Rick Faircloth
<r...@whitestonemedia.com> wrote:
>
> Ok... thanks Mark and Eric
>
> We need a better solution available to developers
> to be able to switch between local and server DNS.
>
> Perhaps, a switch of some kind that could be inserted
> into a URL to tell a browser to use a local hosts file
> if that switch is present.
>
> http://local/www.xyz.com
> or
> http://l:www.xyz.com
>
> That would certainly be a *lot* easier than constantly
> editing that hosts file.
>
> But it's good to know that I can use a local DNS file
> that way!
>
>
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342555
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to