Jump to content

Strange relative links


chopficaro

Recommended Posts

i have a question about how relative links work

i went to a particular website and saw that i was 2 subdirectories deep, that is i was at www.blabla.com/bla/bla/page

then i looked at the source code of the page and saw that the source of an image was src='/images/soso.png'

so one would expect that the full address of this image was

www.blabla.com/bla/bla/images/soso.png

but it wasn't!!! it was at

www.blabla.com/images/soso.png

this is not how these links usually work.

somehow, the browser knew to use the root directory, instead of the current subdirectory of the page. how did it know?

Link to comment
https://forums.phpfreaks.com/topic/201062-strange-relative-links/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.