Uniform Resource Locators (URL's)

line.gif

URL's are used to locate resources on the world wide web.

Syntax

protocol_name://machine_name/server_name/path_name

Example

The URL of Benedict McNamara's Web Server may be specified as:

http://www.iplusplus.com/

where

Notes

The server defaults the document name to index.html; thus, the full URL of the home page is: http://www.iplusplus.com/index.html.

Documents in subdirectories on the server may be accessed directly as shown below.

http://www.iplusplus.com/htmlg/htmlg.htm
http://www.iplusplus.com/htmlr/htmlr.htm

The above references provide the full web address of the resource. Often it is possible to provide a relative address. For example, the currently viewed document may form an active link to the HTML Guide as follows.

<a href=../htmlg/htmlg.htm>HTML Guide</a>

This is the case because .. refers to the parent directory (the root directory of the server) and the directory htmlg is a subdirectory of the root server directory. Documents in the same directory may be named without any path component.

Note that hypertext transfer protocol (http) is not the only available protocol. For example, file transfer protocol (ftp) is yet another protocol name.