When you use /images/something.gif it takes your domain name
(devserver.ourdomain.com) and appends that path to the end of it. So, in
the example you gave, he should reference that image a
/ThisSite/images/something.gif and then it will just tack that onto the
end.  That's an HTTP/browser thing, and has nothing to do with CF or
where it's included from.  It just matters based on where the main file
that's being returned to the browser resides.  You could just do
images/something.gif (minus the leading slash) and it will look for an
images folder in the same folder as where the main document that is
being served to the browser resides.  So if you have
devserver.ourdomain.com/ThisSite/index.cfm and it's including something
that's somewhere else on the server, you can just reference
images/something.gif and it will look for the images  folder inside of
ThisSite since that's where the index.cfm is.  You could also do a
virtual directory but it doesn't necessarily solve a whole lot.

John Burns

-----Original Message-----
From: Jeff Small [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 11:55 AM
To: CF-Talk
Subject: Okay, bear with me, I'm not even sure what I'm asking...

Okay, here's the deal. One of our programmers has created an include
that would be in the root of a site (call it, "navbar.cfm") and there's
one page
(index.cfm) that calls it from the root (<cfinclude
template="navbar.cfm">).

Now, in navbar.cfm, there's a path to an image (let's say <img
src="" for instance). He's using absolute paths
because he says "slash images should always refer to the root" and
doesn't understand why he can't include that same file in a page one
directory below
(about/index.cfm) and it not work. In other words, when the page below
(about/index.cfm) tries to reconcile the path, it's seeing the same path
that the root page is seeing (<img src="" and
it's breaking it and not showing the image (so now, when you "view
source"
on the page, you see http://devserver.ourdomain.com/images/... and you
should see http://devserver.ourdomain.com/ThisSite/images/...) .

Now, our development server is set up on a smallish PC running IIS and
the site (and all others in development) is set up under the webroot of
the IIS server, so that when you're testing it, you simply go to
http://devserver.ourdomain.com/ThisSite/ and you can see the root of
"ThisSite" which is the directory "ThisSite" under webroot
(C:\InetPub\wwwroot\ThisSite).

Is a virtual directory what he's looking for? Is it a mapping issue? I
admit, I'm fairly stupid when it comes to IIS issues and web server
administration issues, and will readily admit that I'm no mapping
wizard, so I hope I explained it correctly, but I'd love to be able to
do this.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to