Skizit
Skizit

Reputation: 44842

relative link for directory above

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.

Upvotes: 6

Views: 34383

Answers (1)

Vincent Ramdhanie
Vincent Ramdhanie

Reputation: 103135

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

Upvotes: 17

Related Questions