6

I've got a file structure like so

Root
-index.html
-adirectory
 ->fileinthedirectory.html

I'd like to create a relative link from fileinthedirectory.html to index.html since /index.html links to /adirectory/index.html which doesn't exist.

Skizit
  • 43,506
  • 91
  • 209
  • 269

1 Answers1

17

To go up one directory you can use:

 ../index.html

or you can start the URL with a slash to start from the root

 /index.html
Vincent Ramdhanie
  • 102,349
  • 23
  • 137
  • 192
  • 1
    `..` would be a better link than `../index.html`. Index pages shouldn't be linked directly except when conforming to legacy systems. This is both for SEO and for maintainability, e.g. when all your `index.html`s change to `index.php`s. – Jess Austin Sep 03 '14 at 22:57