Knowledgebase

Relative Path URL's

Relative paths change depending upon what page the links are located on. There are several rules to creating a link using the relative path:

  • links in the same directory as the page have no path information listed
    filename
  • sub-directories are listed without any preceding slashes
    weekly/filename
  • links up one directory are listed as
    ../filename

How to determine the relative path:

  1. Determine the location of the page you are editing.
    This article is located in the/library/weekly folder on my site.
  2. Determine the location of the page or image you want to link to.
    The Beginner's Resource Center is located here: /library/beginning/
  3. Compare the locations and to decide how to point to it
    From this article, I would need to step up one directory (to/library) and then go back down to the beginning directory
  4. Write the link using the rules listed above:
    <a href="../beginning/bl_begin.htm"> ...</a>


Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
What's CHMOD? (Views: 1619)

Powered by WHMCompleteSolution

Language: