Why not activeWebroot = "/hillyPetersonHome" on dev and just "" on hph
/ production (and then use url =
"#application.activeWebroot#/images/image.jpg" (without the leading /)

On Wed, Aug 18, 2010 at 9:55 AM, Rick Faircloth
<r...@whitestonemedia.com> wrote:
>
> Ok...I thought I had this worked out, but now I'm running into
> path issues on my server.
>
> What I'm trying to accomplish is this:
>
> - I'm using an SVN service to post changes to my web server
> - I commit a change to SVN, then SVN sends update to server
> - On the SVN server, I have two FTP sites set up to handle commits
> - One FTP site gets commits immediately...that's the development site,
>  or folder on my server
> - The second FTP site gets commits only manually...those go to the
>  production site (or folder) when testing and client approval is finished
>
> - To use this setup, I created three variables for application.activeWebroot
> based
>  on the cgi.server_name in use and used this like this:
>
>        <cfif cgi.server_name contains 'localhost'>
>
>                <cfset application.activeWebroot = 'hillyPetersonHomes' >
>
>        <cfelseif cgi.server_name contains 'hph.whitestonemedia.com'>
>
>                <cfset application.activeWebroot = 'hillyPetersonHomes-dev'>
>
>        <cfelseif cgi.server_name contains 'hillyPetersonHomes.com'>
>
>                <cfset application.activeWebroot = 'hillyPetersonHomes'>
>
>        </cfif>
>
>
> This works fine for local development when using paths such as:
>
>        url = /#application.activeWebroot#/images/image.jpg
>
> That translates to http://localhost/hillyPetersonHomes/images/image.jpg.
>
> However, on the server, when domain names become involved, it doesn't work.
> When, viewing a site in the development folder, using the domain
> "hph.whitestonemedia.com", this path:
>
>        url = /#application.activeWebroot#/images/image.jpg
>
> becomes:
>
>        url =
> http://hph.whitestonemedia.com/hillyPetersonHomes-dev/images/image.jpg
>
> which doesn't work.
>
> It needs to be http://hph.whitestonemedia.com/images/

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

Reply via email to