RE: I think I'm confused...
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! -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Wednesday, February 23, 2011 11:13 PM To: cf-talk Subject: RE: I think I'm confused... Rick, Put a pound sign in front of the entry #127.0.0.1 x Close your browsers The open a command prompt and flush your local DNS cahce .. C:\ipconfig /flushdns Then ping the domain... should see a live address returned from your DNS server. -mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com ~| 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:342550 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
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:342551 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Feedback on this approach to many sites, one codebase (MSOC)
That wouldnt be a problem if you only did business in one country. But a LOT of web sites do business around the globe, when no matter what the time is, it's business hours in some part of the world. A VERY LARGE number of web sites of all sizes have no time down for maintenance, except on rare occasions. There are NO commercial sites in Australia that I know of that habitually shut down for anything more than a minute or two EVER. 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 1:45 AM, Michael Grant mgr...@modus.bz wrote: Really. Even banking sites come down for hours of maintenance. I suspect whatever your sites are, your 24/7 with no exceptions is a policy vs. a true necessity. Unless you are perhaps in the defence industry. Live code push? *shudders* On Wed, Feb 23, 2011 at 9:31 AM, Jane Williams janewilliam...@yahoo.co.ukwrote: Our sites run 24/7: we have no maintenance window that size. I bet I'm not the only one, either. ~| 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:342552 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Feedback on this approach to many sites, one codebase (MSOC)
There are NO commercial sites in Australia that I know of that habitually shut down for anything more than a minute or two EVER. Habitually? Where are you getting this stuff from mate? Who said anything about habitually? Are you even reading the same posts stuff I'm posting? I'll bet you dollars to donuts that just about every major website in Australia that rolls out changes to the application core do it when the website is off for maintenance and not in the middle of some poor joker's session. ~| 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:342553 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
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:342554 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
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
Re: I think I'm confused...
One technique for this is to alias the CGI variables you use: cfset CGI_SERVERNAME = CGI.SERVER_NAME / And when you're developing locally, you can set that value as something else to mimic the host you want to simulate. cfif CGI_SERVERNAME is localhost !---// put host to simulate here //--- cfset CGI_SERVERNAME = my.simulated.host.domain.com / /cfif Then, you would fetch host-specific settings, etc, based on the aliased value. cfset _host = CGI_SERVERNAME / cfquery datasource=#ds# name=getAccountID select iaccountid from #schema#sa_accounthosts where vchhost = cfqueryparam cfsqltype=cf_sql_varchar value=#_host# / /cfquery ...then fetch settings for the account. This type of setup can be used to have multiple host aliases for a single account. A good example of this would be host1.domain.com and host2.domain.com, but wanting them to share account data. cfquery datasource=#ds# name=getDefaultHost select vchhost from #schema#sa_accounthosts where bDefault = cfqueryparam cfsqltype=cf_sql_char value=1 / and iaccountid = cfqueryparam cfsqltype=cf_sql_varchar value=#getAccountID.iAccountID# / /cfquery cfif getDefaultHost.RecordCount cfset _host = getDefaultHost.vchhost / /cfif FYI, we use this type of setup for over 50 domains (some with multiple hosts) running on a single code root. ~| 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:342556 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: I think I'm confused...
You can make up whatever entries you want in your hosts file, and it will work on your local machine. 127.0.0.1test1.loc 127.0.0.1test2.loc 127.0.0.1test3.loc 127.0.0.1yo.mama 127.0.0.1my.mama 127.0.0.1free.beer Whatever you want. I would recommend NOT adding host entries for actual sites that you want to really pull up in the browser (your dev server, production sites, etc...) as it really just becomes a pain having to switch back and forth/. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 7:00 AM, Rick Faircloth wrote: 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:342557 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
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. Boy that's starting to get complicated. I'm already, even before actually starting, to long for the days of single, isolated websites. I would tend to ignore the subdomains for now, except for the fact that subdomains using mobile are coming on so strong and are part of my application-building plan... mobile.xyz.com. It seems, especially with the mobile dev world, that it would be a lot simpler, and perhaps more efficient in the end, to have one MSOC app for desktop sites and another MSOC app for the same site in a mobile version. I'm going to have to think on this one for awhile to come up with a sound, long-term (as long as possible in this fast changing landscape) plan. I don't want to get half-way down this path of app development and then realize I need to start all over. Perhaps some of you smart people on the list could blog (in-depth) about how to go about this (in detail!). Rick ~| 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:342558 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: I think I'm confused...
127.0.0.1free.beer My belly would ping flood this domain. ~| 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:342559 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: RE: I think I'm confused...
Jason Fisher's answer is exactly what I'd do. IIS configuration (assuming you're using IIS) is actually the more tedious step. Perhaps adding an additional IP to your NIC and pointing your Hosts records at it would provide simple configuration of IIS for this monster domain app (routing by IP rather than host header). I'll test it. On Feb 24, 2011 8:29am, Rick Faircloth r...@whitestonemedia.com wrote: 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. Boy that's starting to get complicated. I'm already, even before actually starting, to long for the days of single, isolated websites. I would tend to ignore the subdomains for now, except for the fact that subdomains using mobile are coming on so strong and are part of my application-building plan... mobile.xyz.com. It seems, especially with the mobile dev world, that it would be a lot simpler, and perhaps more efficient in the end, to have one MSOC app for desktop sites and another MSOC app for the same site in a mobile version. I'm going to have to think on this one for awhile to come up with a sound, long-term (as long as possible in this fast changing landscape) plan. I don't want to get half-way down this path of app development and then realize I need to start all over. Perhaps some of you smart people on the list could blog (in-depth) about how to go about this (in detail!). Rick ~| 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:342560 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
Perhaps a good approach might be to use fictitious domains locally, since I'm planning to develop sites that are void of client content until the client works with the app to supply every piece of data and asset. That way, I avoid using any client assets in development locally, isolating the local-development app from the client-facing app. That minimizes editing of the host file and I don't have to bother with making sure client assets, either database or files, get transferred to the server. Sigh... so many possibilities... too many, actually. -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Thursday, February 24, 2011 8:15 AM To: cf-talk Subject: RE: I think I'm confused... 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:342561 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Re: RE: I think I'm confused...
I just confirmed that this idea works. The only downside is your NIC will require static IP addresses. On Feb 24, 2011 8:38am, jqdur...@gmail.com wrote: Jason Fisher's answer is exactly what I'd do. IIS configuration (assuming you're using IIS) is actually the more tedious step. Perhaps adding an additional IP to your NIC and pointing your Hosts records at it would provide simple configuration of IIS for this monster domain app (routing by IP rather than host header). I'll test it. On Feb 24, 2011 8:29am, Rick Faircloth r...@whitestonemedia.com wrote: 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. Boy that's starting to get complicated. I'm already, even before actually starting, to long for the days of single, isolated websites. I would tend to ignore the subdomains for now, except for the fact that subdomains using mobile are coming on so strong and are part of my application-building plan... mobile.xyz.com. It seems, especially with the mobile dev world, that it would be a lot simpler, and perhaps more efficient in the end, to have one MSOC app for desktop sites and another MSOC app for the same site in a mobile version. I'm going to have to think on this one for awhile to come up with a sound, long-term (as long as possible in this fast changing landscape) plan. I don't want to get half-way down this path of app development and then realize I need to start all over. Perhaps some of you smart people on the list could blog (in-depth) about how to go about this (in detail!). Rick ~| 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:342562 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
When I'm working on my local development I just add local. So: 127.0.0.1 local.www.durette.org That way I keep the url close to the original for code purposes, but I can get to the real site just by not putting in local. Steve -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 9:20 AM To: cf-talk Subject: Re: I think I'm confused... You can make up whatever entries you want in your hosts file, and it will work on your local machine. 127.0.0.1test1.loc 127.0.0.1test2.loc 127.0.0.1test3.loc 127.0.0.1yo.mama 127.0.0.1my.mama 127.0.0.1free.beer Whatever you want. I would recommend NOT adding host entries for actual sites that you want to really pull up in the browser (your dev server, production sites, etc...) as it really just becomes a pain having to switch back and forth/. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 7:00 AM, Rick Faircloth wrote: 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:342563 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: I think I'm confused...
Ha! Give your own PC a DOS attack? :) Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 8:31 AM, Michael Grant wrote: 127.0.0.1free.beer My belly would ping flood this domain. ~| 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:342564 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: RE: I think I'm confused...
Why not use mydomain.com.dev? Then just strip off the .dev before using the server name variable while in production. This doesn't really seem like that big of a hurdle. On Feb 24, 2011 8:38am, Rick Faircloth r...@whitestonemedia.com wrote: Perhaps a good approach might be to use fictitious domains locally, since I'm planning to develop sites that are void of client content until the client works with the app to supply every piece of data and asset. That way, I avoid using any client assets in development locally, isolating the local-development app from the client-facing app. That minimizes editing of the host file and I don't have to bother with making sure client assets, either database or files, get transferred to the server. Sigh... so many possibilities... too many, actually. -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Thursday, February 24, 2011 8:15 AM To: cf-talk Subject: RE: I think I'm confused... 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 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:342565 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Re: RE: I think I'm confused...
Oops... typo. You will only see .dev in DEVELOPMENT. Therefore, you'll need to strip it off in development, rather than production. On Feb 24, 2011 8:47am, jqdur...@gmail.com wrote: Why not use mydomain.com.dev? Then just strip off the .dev before using the server name variable while in production. This doesn't really seem like that big of a hurdle. On Feb 24, 2011 8:38am, Rick Faircloth r...@whitestonemedia.com wrote: Perhaps a good approach might be to use fictitious domains locally, since I'm planning to develop sites that are void of client content until the client works with the app to supply every piece of data and asset. That way, I avoid using any client assets in development locally, isolating the local-development app from the client-facing app. That minimizes editing of the host file and I don't have to bother with making sure client assets, either database or files, get transferred to the server. Sigh... so many possibilities... too many, actually. -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Thursday, February 24, 2011 8:15 AM To: cf-talk Subject: RE: I think I'm confused... 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 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:342566 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
If I understand the root of what you're proposing, it would be to use a local faux variable, CGI_SERVERNAME, and assign the true CGI.SERVER_NAME to that, and finally assigning the value of CGI_SERVERNAME to _host. The _host value would be the value in the local hosts file. One part that is confusing is this: cfif CGI_SERVERNAME is localhost !---// put host to simulate here //--- cfset CGI_SERVERNAME = my.simulated.host.domain.com / /cfif If I'm trying to differentiate between several different domains in my local hosts file, how is that being done with the code above? It seems that there would have to be an entry with cfif/cfif for each local hosts domain involved to set the variable, rather than depending on what's in the url for the value. I could see this working like that: cfif cgi.server_name is 'localhost' and cgi.script_name contains 'siteName' cfset cgi_servername = 'www.siteNameLocal.com' /cfif However, it doesn't avoid the manual entry of the above code for every local domain name, does it? Or what am I failing to understand? Rick -Original Message- From: Dain Anderson [mailto:da...@terradotta.com] Sent: Thursday, February 24, 2011 9:09 AM To: cf-talk Subject: Re: I think I'm confused... One technique for this is to alias the CGI variables you use: cfset CGI_SERVERNAME = CGI.SERVER_NAME / And when you're developing locally, you can set that value as something else to mimic the host you want to simulate. cfif CGI_SERVERNAME is localhost !---// put host to simulate here //--- cfset CGI_SERVERNAME = my.simulated.host.domain.com / /cfif Then, you would fetch host-specific settings, etc, based on the aliased value. cfset _host = CGI_SERVERNAME / cfquery datasource=#ds# name=getAccountID select iaccountid from #schema#sa_accounthosts where vchhost = cfqueryparam cfsqltype=cf_sql_varchar value=#_host# / /cfquery ...then fetch settings for the account. This type of setup can be used to have multiple host aliases for a single account. A good example of this would be host1.domain.com and host2.domain.com, but wanting them to share account data. cfquery datasource=#ds# name=getDefaultHost select vchhost from #schema#sa_accounthosts where bDefault = cfqueryparam cfsqltype=cf_sql_char value=1 / and iaccountid = cfqueryparam cfsqltype=cf_sql_varchar value=#getAccountID.iAccountID# / /cfquery cfif getDefaultHost.RecordCount cfset _host = getDefaultHost.vchhost / /cfif ~| 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:342567 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
Yes, that's what I was thinking. I mentioned in a response a moment ago, the idea of using an entirely separate local development environment, including all data and assets, from everything on the development environment, and, in turn, from the production environment. Local: 127.0.0.1 local.site01.com 127.0.0.1 local.site02.com Development Server: (I would only have to setup the domains below in IIS. All code and assets would mimic the local setup) dev.site01.com dev.site01.com Production Server: (At this level, all code is uploaded, and all client data and assets are entered by the client through a management interface, so even database values are not shared between local/development and production environments. That's always a pain when I'm using client data or assets locally and the client is also uploading data or assets to the production server and I'm trying to make sure I don't overwrite their data or assets...) www.clientDomain01.com www.clientDomain02.com Does this follow your thinking? (and don't be talking 'bout my mama! ;o) Rick -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 9:20 AM To: cf-talk Subject: Re: I think I'm confused... You can make up whatever entries you want in your hosts file, and it will work on your local machine. 127.0.0.1test1.loc 127.0.0.1test2.loc 127.0.0.1test3.loc 127.0.0.1yo.mama 127.0.0.1my.mama 127.0.0.1free.beer Whatever you want. I would recommend NOT adding host entries for actual sites that you want to really pull up in the browser (your dev server, production sites, etc...) as it really just becomes a pain having to switch back and forth/. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 7:00 AM, Rick Faircloth wrote: 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:342568 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
You need to disable that automated subroutine that keeps pinging everyone 5 minutes for free.beer... -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Thursday, February 24, 2011 9:32 AM To: cf-talk Subject: Re: I think I'm confused... 127.0.0.1free.beer My belly would ping flood this domain. ~| 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:342569 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: RE: I think I'm confused...
I eagerly await your test results! (and further details!) :o) -Original Message- From: jqdur...@gmail.com [mailto:jqdur...@gmail.com] Sent: Thursday, February 24, 2011 9:39 AM To: cf-talk Subject: Re: RE: I think I'm confused... Jason Fisher's answer is exactly what I'd do. IIS configuration (assuming you're using IIS) is actually the more tedious step. Perhaps adding an additional IP to your NIC and pointing your Hosts records at it would provide simple configuration of IIS for this monster domain app (routing by IP rather than host header). I'll test it. ~| 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:342570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: I think I'm confused...
I was under the impression you were wanting to test different domain settings, locally, and the method I mentioned allows you to quickly switch between one domain to the next by just changing the aliased CGI variable. This approach has nothing to do with your hosts file though, so I'm not sure if we're on two different paths here. -Dain On Thu, Feb 24, 2011 at 9:59 AM, Rick Faircloth r...@whitestonemedia.comwrote: However, it doesn't avoid the manual entry of the above code for every local domain name, does it? Or what am I failing to understand? Rick ~| 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:342571 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Re: RE: I think I'm confused...
Bummer... I'm not sure I can get a static IP address. I've currently got a business-class DSL line running for which I could probably get a static IP for additional cost. However, I just responded to a proposal from Comcast to user cable broadband at higher rates at half the price of the DSL. But I don't believe I can get a static IP from Comcast. And I hate complicating things the DynDns.com or something similar. Maybe in the end that would be preferable. Now, how would this work in the local hosts file setup that is really different from using 127.0.0.1? Wouldn't the second IP still be referenced only locally? Or are you talking about using the second IP externally with the development domains setup with external DNS and pointing to the second IP on my dev machine, which would be acting as an externally accessible dev server? -Original Message- From: jqdur...@gmail.com [mailto:jqdur...@gmail.com] Sent: Thursday, February 24, 2011 9:46 AM To: cf-talk Subject: Re: Re: RE: I think I'm confused... I just confirmed that this idea works. The only downside is your NIC will require static IP addresses. On Feb 24, 2011 8:38am, jqdur...@gmail.com wrote: Jason Fisher's answer is exactly what I'd do. IIS configuration (assuming you're using IIS) is actually the more tedious step. Perhaps adding an additional IP to your NIC and pointing your Hosts records at it would provide simple configuration of IIS for this monster domain app (routing by IP rather than host header). I'll test it. On Feb 24, 2011 8:29am, Rick Faircloth r...@whitestonemedia.com wrote: 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. ~| 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:342572 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
That would work easily, it seems. Drawbacks? -Original Message- From: DURETTE, STEVEN J (ATTASIAIT) [mailto:sd1...@att.com] Sent: Thursday, February 24, 2011 9:48 AM To: cf-talk Subject: RE: I think I'm confused... When I'm working on my local development I just add local. So: 127.0.0.1 local.www.durette.org That way I keep the url close to the original for code purposes, but I can get to the real site just by not putting in local. Steve -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 9:20 AM To: cf-talk Subject: Re: I think I'm confused... You can make up whatever entries you want in your hosts file, and it will work on your local machine. 127.0.0.1test1.loc 127.0.0.1test2.loc 127.0.0.1test3.loc 127.0.0.1yo.mama 127.0.0.1my.mama 127.0.0.1free.beer Whatever you want. I would recommend NOT adding host entries for actual sites that you want to really pull up in the browser (your dev server, production sites, etc...) as it really just becomes a pain having to switch back and forth/. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 7:00 AM, Rick Faircloth wrote: 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:342573 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: RE: I think I'm confused...
Yes, that seems like it would work as well as pre-pending local as Steve suggested: local.www.domain.com or www.domain.com.dev. Either of these would work as long as local dev is kept entirely separate from production in terms of variables, etc, which would be dependent on the actual domain name. (Without setting up parsing code to handle the domain variations) -Original Message- From: jqdur...@gmail.com [mailto:jqdur...@gmail.com] Sent: Thursday, February 24, 2011 9:48 AM To: cf-talk Subject: Re: RE: I think I'm confused... Why not use mydomain.com.dev? Then just strip off the .dev before using the server name variable while in production. This doesn't really seem like that big of a hurdle. On Feb 24, 2011 8:38am, Rick Faircloth r...@whitestonemedia.com wrote: Perhaps a good approach might be to use fictitious domains locally, since I'm planning to develop sites that are void of client content until the client works with the app to supply every piece of data and asset. That way, I avoid using any client assets in development locally, isolating the local-development app from the client-facing app. That minimizes editing of the host file and I don't have to bother with making sure client assets, either database or files, get transferred to the server. Sigh... so many possibilities... too many, actually. -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Thursday, February 24, 2011 8:15 AM To: cf-talk Subject: RE: I think I'm confused... 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 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:342574 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Re: RE: I think I'm confused...
I guess I could use: local.domain01.com local.domain02.com dev.domain01.com dev.domain02.com www.domain01.com www.domain01.com But as I've been thinking here, if I keep the local variables and assets completely separate from the production side, any local domains can be used without complication, it seems. local.domain01.com local.domain02.com dev.domain01.com dev.domain02.com (The variables and assets would be exactly the same for local and dev levels. The functionality and assets would just be tested externally on the dev side) Then, for production, actual client domains are used: www.clientDomain01.com www.clientDomain02.com Seem right? -Original Message- From: jqdur...@gmail.com [mailto:jqdur...@gmail.com] Sent: Thursday, February 24, 2011 9:49 AM To: cf-talk Subject: Re: Re: RE: I think I'm confused... Oops... typo. You will only see .dev in DEVELOPMENT. Therefore, you'll need to strip it off in development, rather than production. ~| 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:342575 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
Slight side track: We have about 100+ staging sites here at CFWT for various clients. I got tired of adding client1.cfwebtools.com and client2.cfwebtools.com to the DNS server evertime I had a new site. About 65% of ours sites on non special needs sites and are all on a single CF8 server. So at some point I simply added a wildcard entry for my domain that way *anything*.cfwebtools.com (meaning anything that is not otherwise specified in DNS) hits the same IP address. To set up a new site all I have to worry about is server stuff... no DNS. -Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Dain Anderson [mailto:da...@terradotta.com] Sent: Thursday, February 24, 2011 9:16 AM To: cf-talk Subject: Re: I think I'm confused... I was under the impression you were wanting to test different domain settings, locally, and the method I mentioned allows you to quickly switch between one domain to the next by just changing the aliased CGI variable. This approach has nothing to do with your hosts file though, so I'm not sure if we're on two different paths here. -Dain On Thu, Feb 24, 2011 at 9:59 AM, Rick Faircloth r...@whitestonemedia.comwrote: However, it doesn't avoid the manual entry of the above code for every local domain name, does it? Or what am I failing to understand? Rick ~| 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:342576 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
What I'm trying to accomplish (which perhaps has been slowly modified over the course of this thread :o) is setting up an easily maintained MSOC development environment for all levels; local, development, and production. At first, I was thinking about perhaps needing to mimic actual client domains, but if the environments are completely separate in terms of variables, the domains actually used at all levels shouldn't matter. Your method would work, however, for using the actual domains involved on the client side locally, as has been proven by your successful deployment. -Original Message- From: Dain Anderson [mailto:da...@terradotta.com] Sent: Thursday, February 24, 2011 10:16 AM To: cf-talk Subject: Re: I think I'm confused... I was under the impression you were wanting to test different domain settings, locally, and the method I mentioned allows you to quickly switch between one domain to the next by just changing the aliased CGI variable. This approach has nothing to do with your hosts file though, so I'm not sure if we're on two different paths here. -Dain On Thu, Feb 24, 2011 at 9:59 AM, Rick Faircloth r...@whitestonemedia.comwrote: However, it doesn't avoid the manual entry of the above code for every local domain name, does it? Or what am I failing to understand? Rick ~| 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:342577 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: I think I'm confused...
You may be able to take it a step further and on your Development Server just have the IIS default website point to your MSOC site. Then, you won't need to fool with any IIS entries, just add whatever urls you want to your local hosts file and have the IP address point to your Dev Server. When the Dev Server gets the request, it will just hand it to the default site without worrying about what url is. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 9:10 AM, Rick Faircloth wrote: Yes, that's what I was thinking. I mentioned in a response a moment ago, the idea of using an entirely separate local development environment, including all data and assets, from everything on the development environment, and, in turn, from the production environment. Local: 127.0.0.1 local.site01.com 127.0.0.1 local.site02.com Development Server: (I would only have to setup the domains below in IIS. All code and assets would mimic the local setup) dev.site01.com dev.site01.com Production Server: (At this level, all code is uploaded, and all client data and assets are entered by the client through a management interface, so even database values are not shared between local/development and production environments. That's always a pain when I'm using client data or assets locally and the client is also uploading data or assets to the production server and I'm trying to make sure I don't overwrite their data or assets...) www.clientDomain01.com www.clientDomain02.com Does this follow your thinking? (and don't be talking 'bout my mama! ;o) Rick -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 9:20 AM To: cf-talk Subject: Re: I think I'm confused... You can make up whatever entries you want in your hosts file, and it will work on your local machine. 127.0.0.1test1.loc 127.0.0.1test2.loc 127.0.0.1test3.loc 127.0.0.1yo.mama 127.0.0.1my.mama 127.0.0.1free.beer Whatever you want. I would recommend NOT adding host entries for actual sites that you want to really pull up in the browser (your dev server, production sites, etc...) as it really just becomes a pain having to switch back and forth/. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 7:00 AM, Rick Faircloth wrote: 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:342578 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
Sounds like a really good approach for those non-special-needs sites. -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Thursday, February 24, 2011 10:36 AM To: cf-talk Subject: RE: I think I'm confused... Slight side track: We have about 100+ staging sites here at CFWT for various clients. I got tired of adding client1.cfwebtools.com and client2.cfwebtools.com to the DNS server evertime I had a new site. About 65% of ours sites on non special needs sites and are all on a single CF8 server. So at some point I simply added a wildcard entry for my domain that way *anything*.cfwebtools.com (meaning anything that is not otherwise specified in DNS) hits the same IP address. To set up a new site all I have to worry about is server stuff... no DNS. -Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Dain Anderson [mailto:da...@terradotta.com] Sent: Thursday, February 24, 2011 9:16 AM To: cf-talk Subject: Re: I think I'm confused... I was under the impression you were wanting to test different domain settings, locally, and the method I mentioned allows you to quickly switch between one domain to the next by just changing the aliased CGI variable. This approach has nothing to do with your hosts file though, so I'm not sure if we're on two different paths here. -Dain On Thu, Feb 24, 2011 at 9:59 AM, Rick Faircloth r...@whitestonemedia.comwrote: However, it doesn't avoid the manual entry of the above code for every local domain name, does it? Or what am I failing to understand? Rick ~| 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:342579 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
True, true... -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 10:44 AM To: cf-talk Subject: Re: I think I'm confused... You may be able to take it a step further and on your Development Server just have the IIS default website point to your MSOC site. Then, you won't need to fool with any IIS entries, just add whatever urls you want to your local hosts file and have the IP address point to your Dev Server. When the Dev Server gets the request, it will just hand it to the default site without worrying about what url is. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 9:10 AM, Rick Faircloth wrote: Yes, that's what I was thinking. I mentioned in a response a moment ago, the idea of using an entirely separate local development environment, including all data and assets, from everything on the development environment, and, in turn, from the production environment. Local: 127.0.0.1 local.site01.com 127.0.0.1 local.site02.com Development Server: (I would only have to setup the domains below in IIS. All code and assets would mimic the local setup) dev.site01.com dev.site01.com Production Server: (At this level, all code is uploaded, and all client data and assets are entered by the client through a management interface, so even database values are not shared between local/development and production environments. That's always a pain when I'm using client data or assets locally and the client is also uploading data or assets to the production server and I'm trying to make sure I don't overwrite their data or assets...) www.clientDomain01.com www.clientDomain02.com Does this follow your thinking? (and don't be talking 'bout my mama! ;o) Rick -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 9:20 AM To: cf-talk Subject: Re: I think I'm confused... You can make up whatever entries you want in your hosts file, and it will work on your local machine. 127.0.0.1test1.loc 127.0.0.1test2.loc 127.0.0.1test3.loc 127.0.0.1yo.mama 127.0.0.1my.mama 127.0.0.1free.beer Whatever you want. I would recommend NOT adding host entries for actual sites that you want to really pull up in the browser (your dev server, production sites, etc...) as it really just becomes a pain having to switch back and forth/. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com On 2/24/2011 7:00 AM, Rick Faircloth wrote: 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:342580 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
I have done that as well. You can do a local dns server but it is a lot easier to just mod the hosts file than to mod a local dns server. -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Thursday, February 24, 2011 04:22 To: cf-talk Subject: RE: I think I'm confused... 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! -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Wednesday, February 23, 2011 11:13 PM To: cf-talk Subject: RE: I think I'm confused... Rick, Put a pound sign in front of the entry #127.0.0.1 x Close your browsers The open a command prompt and flush your local DNS cahce .. C:\ipconfig /flushdns Then ping the domain... should see a live address returned from your DNS server. -mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com ~| 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:342581 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
Special thanks goes out to Jason, who just helped me set up a separate IP on my PC for local dev. Now all I have to do is edit the hosts file using the new IP for local development. Cool... :o) -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Thursday, February 24, 2011 10:46 AM To: cf-talk Subject: RE: I think I'm confused... True, true... -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Thursday, February 24, 2011 10:44 AM To: cf-talk Subject: Re: I think I'm confused... You may be able to take it a step further and on your Development Server just have the IIS default website point to your MSOC site. Then, you won't need to fool with any IIS entries, just add whatever urls you want to your local hosts file and have the IP address point to your Dev Server. When the Dev Server gets the request, it will just hand it to the default site without worrying about what url is. Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com ~| 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:342582 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfcontent and save as
Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~| 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:342583 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent and save as
You need to use the cfheader tag and tell it the filename. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Friday, 25 February 2011 5:22 AM To: cf-talk Subject: cfcontent and save as Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~~ ~~~| 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:342583 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| 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:342584 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
This question comes up pretty often. I don't remember if there's actually a fix or not. I remember people having problems despite using cfheader to define content-type and disposition. Perhaps some of these will help: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:8207 On Thu, Feb 24, 2011 at 1:22 PM, Richard White rich...@j7is.co.uk wrote: Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~| 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:342585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent and save as
As long as you use attachment as well as filename in the cfcontent you will never have a problem. So it should something like this cfheader name=Content-Disposition value=Attachment;FILENAME=#FileName# Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, 25 February 2011 5:46 AM To: cf-talk Subject: Re: cfcontent and save as This question comes up pretty often. I don't remember if there's actually a fix or not. I remember people having problems despite using cfheader to define content-type and disposition. Perhaps some of these will help: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf- talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:8207 On Thu, Feb 24, 2011 at 1:22 PM, Richard White rich...@j7is.co.uk wrote: Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~~ ~~~| 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:342585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| 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:342586 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
Ah, these are the threads I was remembering. http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62324#339820 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62324#339820 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62327#339828 http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339828 On Thu, Feb 24, 2011 at 1:56 PM, Andrew Scott andr...@andyscott.id.auwrote: As long as you use attachment as well as filename in the cfcontent you will never have a problem. So it should something like this cfheader name=Content-Disposition value=Attachment;FILENAME=#FileName# Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, 25 February 2011 5:46 AM To: cf-talk Subject: Re: cfcontent and save as This question comes up pretty often. I don't remember if there's actually a fix or not. I remember people having problems despite using cfheader to define content-type and disposition. Perhaps some of these will help: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf- talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:8207 On Thu, Feb 24, 2011 at 1:22 PM, Richard White rich...@j7is.co.uk wrote: Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~~ ~~~| 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:342585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| 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:342587 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm