PDF (adobe.com)

Specify the type of path for links in a website

Certain pieces of code called paths are used to link Internet files. Software applications, such as a browser, use paths to locate a file. A browser can use a path to find, for example, an image file to display in an HTML page.

Administrators link web pages or files by specifying a path for them. The path to a file can be specified in any one of the following ways:

Document relative path
provides the location of a file in relation to another file on the same storage device. The starting point is the location of the document under consideration.

Site-root-relative
Websites are stored inside a main folder on a computer configured to work with browsers to display Web pages. This main folder is often referred to as the site root folder or just the root folder. A site root-relative path describes the location of a file relative to the root folder of the site. In other words, the starting point is the root folder of the site rather than the location of the document within the path. For example, the path can appear as: /html/images/image1.gif

The "/" indicates to the computer to search for a file within the site root folder.

Site root-relative links are most often used with sites that have many directories with files that get moved around often.

Absolute
provides the exact location of a file on the Internet. It doesn't specify the path in relation to something. The starting point is the location of the website on the Internet.

For example, "http://my.site.com/html/images/image1.gif".

When a file is inserted from your computer, Contribute writes the link in "file:///" URL format before publishing in Edit mode. The link settings are applied after the page is published to the site. The path is rewritten as document relative or site-root-relative depending upon link settings specified in Contribute.

When you insert files from websites, Contribute writes the link in a relative format if the files are from the same site (or domain). If the files are from different domains, Contribute uses the absolute format. The new Link setting affects the way the relative format is created. If the setting is for "Site root-relative," the links are created as root relative links.

For files inserted from the Internet, Contribute writes the links in an absolute format irrespective of the option specified in the Link setting.

For shared assets, and URLs in the same domain, Contribute writes the links in a "relative" format. In this case, the new Link setting decides the type of "relative" format. For all other cases, Contribute rewrites the link to the format chosen by the administrator.

When you publish a web page, Contribute updates all dependent links in the page. It also updates links to the current page in all its parents. In this process, Contribute rewrites all "file:///" links as relative links. The Link setting decides the type of relative link that is chosen.

  1. Select Edit > Administer Websites (Windows) or Contribute > Administer Websites (Mac OS), and select the website you want to administer from the submenu.

  2. If prompted, enter the Administrator password and click OK. The Administer Website dialog box appears.

  3. Select Links on the left panel.

  4. In the right panel, do one of the following

    • Select Write links relative to the current page (document relative) to link files in the website using a document relative path.

    • Select Write links relative to the root of the website (site root relative) to link files in the website using a site-root-relative path.

  5. Click Close.

The Link setting is applied to all pages in a website. You can change the document relative setting to site-root relative for individual files when specifying the link for file types in the File Placement Rule dialog box. If you have selected the site-root-relative link, the option to insert a link as site-root-relative in the File Placement Rule dialog box is disabled.

Note: This setting overrides any role-specific setting for file placement.