>Where are the files in relation to webroot? Assuming your structure looks
>like this:

The url is http://localhost/whmedia/index.cfm

My directory structure is something like this:

/
/whmedia
/whmedia/styles
/whmedia/images
/whmedia/inc
/whmedia/cflib

You are correct in assuming that I have been trying to do it like this:
/images/someimage.jpg

>What I've done is to set a variable in the Application file containg my
>master path. Then anyplace I call any other file (images, JS, cf templates)
>I append that variable and everything is good.

That is what I have done in the past as well but I began to wonder
what the point of doing that would be if you could just point set all
the paths relative to the root. Is there any bad side effects to using
paths such as /root/images/bg.gif or /images/bg.gif? They should work
on both the development box and remote right?

Thanks for you help Andy!
-Aaron

On 4/27/06, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Where are the files in relation to webroot? Assuming your structure looks
> like this:
>
> /
> /mysite
> /mysite/images
> /mysite/includes
> /anothersite
> /anothersite/images
> /anothersite/includes
>
> From within "mysite", your links would have to look like this:
>
> /mysite/images/someimage.jpg
> or
> images/someimage.jpg
>
> If you called it like this:
> /images/someimage.jpg
>
> the server would think you were looking for an images folder in the root.
>
> What I've done is to set a variable in the Application file containg my
> master path. Then anyplace I call any other file (images, JS, cf templates)
> I append that variable and everything is good.
>
>
> <!----------------//------
> andy matthews
> web developer
> ICGLink, Inc.
> [EMAIL PROTECTED]
> 615.370.1530 x737
> --------------//--------->
>
> -----Original Message-----
> From: Aaron Roberson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 27, 2006 10:57 AM
> To: CF-Talk
> Subject: Question about relative and root links
>
>
> I'm not exactly a newbie but this is something basic that I have never
> worked out before:
>
> I am running IIS 5 and ColdFusion 7 (as well as BD 6.2) on my
> development box and when I code my urls at relative to the site root
> using a single forward slash (/) the page doesn't display and CF
> throws a "Could not find template" error.
>
> How do I get my links to work beginning at the root level?
>
> Thanks in advance,
> Aaron
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238935
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to