In HTML, there are in many pages links which point to a sub-directory, let us consider
href="Dir/Subdir/Subdir2/index.html"
On some pages, however, links in a file in a subdirectory point to a different subdirectory at the same level, in a matter as if it was in a relative subdirectory. In other words,
Dir/Subdir/Subdir2/index.html
would contain
a href="Subdir/Subdir3333/index.html"
which would in fact point to
Dir/Subdir/Subdir3333/index.html.
I would think this was wrong, however conventional browsers point to the correct locations.
I have been looking for a solution for quite a while now, though I couldn’t find an answer.
Could you point me to a specific part of HTML documentation which explains how the relative locations work?
Thanks
You can define a base href attribute in your HTML document’s head which makes all relative URLs start at this BASE url.
See here.
Otherwise the relative paths work the same as filesystem paths. / to the root (domain) and ../ to go up one directory.