Base URLs

Relative Base URLs Giving a URL a Base URL Viewing and Adding Base URLs

Your web site is made up a series of web pages. Each web page has a full Uniform Resource Locator (URL) something like

Your web page URLs will usually start with the same set of letters, eg in this case. This common prefix is what we call your Base URL.

Using Base URLs simplifies your work as you do not need to see or type in the full URL for each page that you want to refer to.

You can have more than one Base URL in an index file.

Relative Base URLs

In the above example, the Base URL (eg added to the page name (eg intro.htm) gives the full absolute URL of the page (

However in most cases it is better to specify a relative Base URL. If the Base URL is just blank, and Hi HelpIndex is run from then displaying intro.htm will automatically show the right page:

The advantage of a blank relative Base URL is that Hi HelpIndex will also show the right page when it is run from your local disk. Ie if you are running Hi HelpIndex in C:\Web\MyPages\ and ask to display intro.htm then the correct local page C:\Web\MyPages\intro.htm is displayed.

So having a relative Base URL makes your index work both on your working local copy of your web site and on the web site server itself.

A relative Base URL is necessary when producing a CD-ROM or running a product as you do not know the URL of the pages in advance.

Giving a URL a Base URL

The URL General Properties page lets you select a Base URL from a list of those available.

In addition, the list includes a Base URL of <None>. For web site users, this is equivalent to having a blank Base URL. However, it is useful for Java application developers using HelpIndex as a part of their help system. Setting the Base URL to <None> ensures that a file URL's directory information is not prepended to the URL, thereby allowing access to pages in jar files.

Viewing and Adding Base URLs

Your index file's Base URLs can be found by looking at the index file's properties (or by doing a print).

Select View+Base URLs to see the Base URLs Property Page.

You should be able to see any existing Base URLs in the top list box. The settings for the currently highlighted Base URL are shown in the boxes below, where you can edit them if necessary. Simply press the Add button to add a new Base URL, and fill in the edit boxes below as necessary.

Note that you can only delete a Base URL if no URL is using it. (Stop and re-start Hi Lab to confirm that a Base URL is not being used.)

If you press the Set all URLs to this Base URL button then it changes all the URLs to use this Base URL.

Otherwise to use a new Base URL, press OK to store your changes and select the entry in the Contents that you want to change. View its properties and select you new Base URL from the Base URL drop down list.

See also: Base URLs Property Page