I have validated the cgi.server_name and set those variables:


<CFIF cgi.server_name contains "staging">
    <cfset request.webroot = http://localhost/myapp <http://localhost/myapp>
>
    <cfset request.fileroot = "c:\wwwroot\myapp">
<cfelse>
    <cfset request.webroot = http://staging/myapp <http://staging/myapp> >
    <cfset request.fileroot = "h:\hosting\myusername\wwwroot\myapp">
</cfif>


  _____  

From: Mark Drew [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 12:05 PM
To: CF-Talk
Subject: Re: webroot level?

I have been thinking about this problem as well. Iwant to set in tha
Application.cfm to say "I, Application.cfm, am at this URL and this
path"
which would come out:

on my devmachine as

http://locallhost
and
c:\www\webmadness

or on my staging machine as

http://stagingmachine/webmadness
and
d:\Inetpub\wwwroot\webmadness

This is what has been troubling me for a while

Any simple solution?

MD

On Thu, 22 Jul 2004 10:54:07 -0500, CF Developer
<[EMAIL PROTECTED]> wrote:
> will that work for cfincludes?
> such as:  <cfinclude template=/includes/thisfile.cfm>
>
> since this is a shared hosting, i do not have access to
> establish cf mappings
>
>
> ----- Original Message -----
> From: Jason L. West, Sr. <[EMAIL PROTECTED]>
> Date: Thu, 22 Jul 2004 11:11:16 -0400
> Subject: Re: webroot level?
> To: CF-Talk <[EMAIL PROTECTED]>
>
> > isn't there a way to specify something like:
> >
> > img src=""> >
> Yes this does pull from the root of your url:
>
> ex: http://www.site.com/images/image.gif
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to