decorative banner

Setting up distributed Web sites


    If you plan to distribute your Web site across several servers (subsites), you can still develop and test the site as a whole on your local file system. To do so, you need to set up the distributed site with URL mappings between local addresses and server addresses.

    The advantage of URL mappings is that you can easily manage multiple sites without having to rewrite URLs or duplicate files. The sites may share many of the same files and may even link to each other.

To set up a Web site distributed among several servers:

  1. Create a separate site document for each server.
  2. Keep index.html as the filename for home page of the site that is the entry point of your distributed site.
  3. Rename the home page filename for all the other subsites. This avoids duplicate filenames in your distributed site.
  4. Add pages and links for all the subsites, linking between subsites as you would if you were linking to another local site. For example, a link from a page in the Soccer subsite to the Putters.html page in the Golf subsite might be addressed file:///path/Golf/Putters.html. Links between subsites can use either relative or full paths.
  5. Make the site window containing the index.html home page active.
  6. Click the Site Settings button Site Settings button on the toolbar, or choose Site > Settings.
  7. Click URL Mappings, then click the Create New Item button New button .
  8. Choose Root of this Site from the menu Map Local Folder or Remote next to the Map Local Folder or Remote Server text box.
  9. This displays the path to the root folder corresponding to the current site document. When you provide an external link to an address on the server in the next step, you can probably preserve some of this path.

  10. Edit the path so it contains the URL to the location this root folder will have on the server.
  11. Note: You can also use URL Mappings to map a local folder. You would do this if you wanted to conceal your site's folder hierarchy.

  12. Choose Root of this Site from the With Local Folder menu Map Local Folder or Remote.
  13. This maps the current location of the root folder to its future location on the server.

  14. Click OK to save the site settings, or repeat steps 4 through 10 for each of the site documents you renamed in step 2.
  15. Important: If you plan to use the Clean Up Site command with any of the subsites you have created, first deselect Add Used Files and Add Used External References in the Clean Up Site Options dialog box. Otherwise, using the Clean Up Site command will destroy the structure of the distributed site.

To test a distributed site in a Web browser before uploading it:

  1. View a page in any of the root folders that contains a link that references a page in another root folder.
  2. Move the cursor over the link. The link should contain the local path to the page.
  3. Repeat these steps for every link referencing a page in another root folder.