Kender du det problem at du har flere foldere og sub domains hos din hjemmeside host, og du gerne vil lave dybe links til et dokument i andre foldere?
Her er en engelsk tekst om hvordan du gør:
Document-relative links use directions from the source page to the destination page, sort of like saying “Start here then follow this path until you reach the destination”.
There are three ways to do this - the method you use will depend on the location of the source and destination pages in relation to each other. We will use the example on the right and create hyperlinks from the page called sourcepage.html to other pages in the site.
(1) If the destination page is in the same directory as the source page
All you need to specify is the source file name:<a href=”page1.html” mce_href=”page1.html”>Go To Page 1</a>
(2) If the destination page is in a folder inside the source page’s folder
Specify the folder name and then the file name:
<a href=”directory2/page2.html” mce_href=”directory2/page2.html”>Go To Page 2</a>
(3) If the destination page is in a folder outside the source page’s folder
Use the special instruction ../ which signifies “one directory higher”.
The following link means “Go up one directory level, then go to a folder called directory3, then to a file called page3.html“:
<a href=”../directory3/page3.html” mce_href=”../directory3/page3.html”>Go To Page 3</a>
You can repeat the ../ to make the link more than one level higher, for example, “Go up two levels, to a file called index.html“:
<a href=”../../index.html” mce_href=”../../index.html”>Go To The Index Page</a>
Important Note: For relative links to work, you must keep the file structure intact.
For example, if you moved the sourcepage.html file down into the directory2 folder, the relative links would no longer work. In this case you would need to add another ../ to point the links to the correct level. For example:
<a href=”../../../index.html” mce_href=”../../../index.html”>Go To The Index Page</a>







