Setting the relative path of new links

Setting the relative path of new links

By default, Dreamweaver creates links to other pages in your site using document-relative paths. You can tell Dreamweaver to create links with site root-relative paths instead. For more information on relative paths, see Understanding document locations and paths.

To use site root-relative paths, you must first define a local folder in Dreamweaver by choosing a local root folder to serve as the equivalent of the document root on a server (see Setting up a new Dreamweaver site). Dreamweaver uses this folder to determine the site root-relative paths to files.

You set the relative path of new links in the Site Definition dialog box.

To set the relative path of new links:

  1. Select Site > Manage Sites.

    The Manage Sites dialog box appears.

  2. Double-click your site in the list.

    The Site Definition dialog box appears.

  3. Click the Advanced tab, if the Advanced settings aren’t showing.

    The Advanced tab of the Site Definition dialog box displays the Local Info category options.

  4. Set the relative path of new links by selecting the Document or Site Root option.

    Changing this setting will not convert the path of existing links after you click OK. The setting will only apply to new links you create with Dreamweaver.

  5. For site root-relative paths, enter the URL that your completed website will use in the HTTP Address text box.

    Dreamweaver uses this address to make sure root-relative links work on the remote server, which may have a different site root. For example, if you are linking to an image file located in the C:\Sales\images\ folder on your hard disk (where Sales is your local root folder), and the URL of your completed site is (where SalesApp is your remote root folder), then entering the URL in the HTTP Address text box will ensure that the path to the linked file on the remote server is /SalesApp/images/.

  6. Click OK.

The new path setting applies only to the current site.

Related topics

  • Understanding document locations and paths
  • Using the Advanced settings to set up a Dreamweaver site
  • 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