Site root-relative paths

Site root-relative paths

Site root-relative paths provide the path from the site’s root folder to a document. You may want to use these types of paths if you are working on a large website that uses several servers, or one server that hosts several different sites. However, if you are not familiar with this type of path, you may want to stick to document-relative paths.

A site root-relative path begins with a leading forward slash, which stands for the site root folder. For example, /support/tips.html is a site root-relative path to a file (tips.html) in the support subfolder of the site’s root folder.

A site root-relative path often provides the best way to specify links in a website in which you need to frequently move HTML files from one folder to another. When you move a document that contains root-relative links, you don’t need to change the links; for example, if your HTML files use root-relative links for dependent files (such as images), then if you move an HTML file, its dependent-file links are still valid.

However, when you move or rename the documents linked to with root-relative links, you do need to update those links, even if the documents’ paths relative to each other haven’t changed. For example, if you move a folder, all root-relative links to files within that folder must be updated. (If you move or rename files using the Files panel, Dreamweaver updates all relevant links automatically.)

Related topics

  • Setting the relative path of new links
  • Setting Local Info category options

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Inserting and Formatting Text
Adding Audio, Video, and Interactive Elements
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly