Relative links in html?
Okay, I feel completely stupid posting this. I'm not sure if it is classified as a programming issue, but its close enough. My web app uses relative links on the same page:
<img src='images/start.png' />
My other page is in the exact same directory, but firebug says the above code is http://localhost/projectFolder/viewtrip.php/images/start.png
. I am confused and I feel like a complete idiot. Am I clearly doing something wrong?
source to share
When you provide a relative path, you tell the browser that the element is at that location, using the current document as the base. Where is the image directory on your website? If you put / at the front of the path, you tell the browser that the element can be found using the root from your site as the base. The only real value I've found to use. / Or ../ in front of the tracks is correct rendering on preview when editing a file, and sometimes this causes problems (for me) at release time.
source to share