Forum Moderators: open
may be this is not the right place to write this post but I need your help.
I have designed a site. I have problems with the requests, the statistic shows 404 error - Document not found.
Most of them are the images path.
this is example what I got:
img/rachel/img/links/get.gif - 404
The path used in the html files is ../../img/links/get.gif, the img/rachel directory exists but has other images in it.
Why this wrong path is generated?
Can you please help me to solve this problem, I suppose it is something related with the paths to the images.
Best Regards, Ani
img/rachel/img/links/get.gif - 404Hello Ari,
The path used in the html files is ../../img/links/get.gif
It looks like your image is located at
www.example.org/img/rachel/img/links/get.gif
For your html code to work it must be at
www.example.org/img/rachel/l3/l4/file.html
L4 is the folder holding your html,
The path used in the html files is ../../img/links/get.gif, so
http://localhost/img/rachel/l3/l4/htmlfile.html
The location on my computer for this web site is is in my apache/public_html/ folder. You could make it work on your computer by referencing down to the apache/ or the drive root, but it would then fail on your web site because you cannot reference below the public_html, or whatever folder name is given as your web space root.
Larry
PS:
I don't know if you are working with shtml, and server side includes, but if the code snippet calling the gif is being included in another work, then the code snippet's location must be considered the location of the htmlfile in this example.
I added a base href, giving the base as
<base href="http://localhost/img/rachel" />
,
and the file turned up missing. So this is one more place to check out. My server error log reported the file does not exist and gave this location:
/Apache/public_html/img/links
Larry
I want to appologize that I did not write the paths correctly.
Ignote my previous explanaition,I made a mistake :(
I have this structure of my site:
root/index.html
root/img/get.gif
root/img/rachel/test.html
root/img/rachel/rachel.gif
I suppose that the relative path causes the problem
root/img/rachel/img/get.gif.
I have this code in the source of the main index.html -<img src="/img/get.gif">, why is this happening, why this path is generated for request.
Best Regards, Ani