I feel like a nub for asking this, but I can't figure it out.. I've found several posts (here's one) saying that to use a relative path from the root of your site, start the path with /
, ex:
<img src="/images/img1.jpg" />
My file hier. looks like
-root
-images
-css
-index.aspx
-subFolder
-test.aspx
Now when I use the src
path as shown above, it doesn't work in either index.aspx or test.aspx, but when I remove the /
, it works for index.aspx. In test.aspx, I used ../images/img1.jpg
and it works. What gives? Why is my example above not working?