Link to home
Start Free TrialLog in
Avatar of toyman61
toyman61

asked on

How-to reference an image in another folder?

I have an Apache-server with images in a folder called "Images" near the root of the webserver (www/images).
Now I have folder tree with folders containing header-files with references to images in the images folder.
(An example:  www/Info/Documents/Bills. In the 'Info'-folder I have a file called "header.htm" which has a reference to
an image called "companylogo.gif". The URI created by Word 2003 is <a href="../images/companylogo.gif" and that works fine).

But when I try to reference the same image-file from the 'Bills'-folder with URI <a href="../../../images/companylogo.gif" I get an 404 error when I try to show that image. Why ?

Avatar of Seven price
Seven price
Flag of United States of America image

If I see this correctly you have a folder with images and another folder within this image folder.

Your path does not look correct.
../images/companylogo.gif is the first folder then you have another folder called images.
should be /../images/companylogo.gif
From /Info/Documents/Bills/ via ../../../images/companylogo.gif to /images/...... looks correct.

And which resource did your browser request? You can monitor the HTTP headers with a firefox extension: https://addons.mozilla.org/de/firefox/addon/3829

You should find a menu entry in your tools menu after installing the extension. Open it and  request your page after you cleared your cache. Does your browser request
GET /images/companylogo.gif  ?
ASKER CERTIFIED SOLUTION
Avatar of toyman61
toyman61

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial