Reputation: 3750
Ok. So the problem is here..
on this address i have this url: _http://localhost/blog
img src='image/b.jpg'
and everything goes fine.. because i have my image in "image" folder... browser asking image with this url "_http://localhost/image/b.jpg"
but if i got to: _http://locahost/blog/otherfolder/
then browser start looking for "_http://localhost/blog/image/b.jpg"
I know why this happen. But i only want to know is there a way to set "universal" relative url? That ignore folders and relative to host? By plain HTML
Something like ".. src='{host}/image/b.jpg' .."
Upvotes: 1
Views: 9826
Reputation: 17553
Yeah this is a bit of broken-ness in the web. I mean I am writing JSP tags, and either
So we go with absolute URLs, but it's not ideal.
Not that, if I were designing the web, I would have a better way to do it ....
Upvotes: 0