Well, first, it might be useful to figure out what exactly you mean by
"webroot" here. Generally, it means the folder that actually maps to a
web server's HTTP root directory. For example, if you have a single
web server that corresponds to a single domain, you might have
something like this:
which maps to
Assuming that your webroot is e:\webroot\www.abc.com, neither of those
image tags will work. The second won't work no matter what your webroot is,
because a browser isn't going to be able to resolve a directory path
on the server. You'd have to create a virtual directory for each of
those virtual web servers (www.abc.com, www.def.com). Then, you'd be
able to resolve URLs using the virtual directory as your starting
Dave Watts, CTO, Fig Leaf Software
It would be helpful to know exactly how you are accessing these domains from a web browser.
If its the first one, <img src="/images/image.gif"> will work.
If its the second, the IMAGES folder would be below you're "webroot" and would not be accessible no matter what you did. What you could do in this case is create a "Virtual Directory - IIS" or a "SimLink - Linux" linking to the IMAGES folder for each site. So that both sites would have access to the same IMAGES folder.
It's probably important to shift your thinking a bit here. Theer are two different "roots" here (well: three, if you're looking at a default IIS install):
* CF root;
* web site root;
* a directory called wwwroot
Looking at your example:
webroot (which I am guessing is your C:\inetpub\wwwroot dir) in this case is not your "web root", it's your CF root, by the looks of it. And the directories www.abc.com and www.def.com are your web roots for those two sites.
Confusion often arises here because when one configures CF, the CF root is often mapped to C:\inetpub\wwwroot (or the htdocs dir or whatever the web root is of the web server's default site), so it seems like there's just the one "web root". But there isn't.
So CF will look for resources in the CF root; the web server will look for resources in the web root of the site being served.
In your example, the websites cannot access IMAGES, because that directory is not in the web root of the site. As someone else has suggested, you need to add a virtual directory within the website to map to the IMAGES dir.
You cannot use .. notation to navigate up the file system to "above" the web root, because as far as the web site is concerned, the www.abc.com dir is the ROOT directory. IE: that's as far up the file system the site can access.
The reason why you E:\[etc] path does not work is because that path is requested by the web browser, which is going to be on a completely different computer to where the E: drive is. The path needs to be a URL.