ToC ~ Up ~ Prev ~ Next ~ Index |
Introduction to HTML Last Update: 5 January 1998 |
URLs, or Uniform Resource Locators, are the method by which documents or data are addressed in the World Wide Web. The URL contains the following information:
URLs are more sophisticated than this brief introduction would imply. For more detail, have a look at the URL overview document, found at the URL: http://www.w3.org/hypertext/WWW/Addressing/URL/Overview.html.
The following is an outline of the most common form of a URL:
http://www.address.edu:1234/path/subdir/file.ext | | | | | |service | | | | |____ host ______| | | | | | |port| | | file and | |_ resource details _|
The above figure gives a general outline of URL structure. This outline if followed by most, but not all, URLs. Specific cases are discussed in subsequent sections.
The first part is the service specifier, (here HTTP service) which specifies the access method. Specifically this is the part before the colon. Some examples of services are: http:, gopher:, wais: and ftp:.
The second part is usually the internet address of the server, indicated by the double forward slash (//). This address can also contain the (optional) port number the service listens at. The full name is then specified by a string like //www.address.edu:1234/, where :1234 means Port number 1234. If you want to use the default port number you can leave out both the colon and the number, i.e. //www.address.edu/.
The forward slash after the host and port specifications indicates the end of the address and the beginning of the specification for the file/resource to be accessed. This field varies depending on the service being accessed. A few simple examples follow: more detailed ones are given in the documents listed below.
In some cases the internet address and resource location are omitted. The common examples of this are news: (for accessing Usenet news group information) and mailto: (for sending e-mail).
The URL scheme also allows you to include a query string
that is to be passed to the designated URL. This is indicated by
placing a question mark at the end of the URL, followed by the
desired query string. For example:
http://www.where.edu/cgi-bin/program?query_string_data
The query string must be specially encoded, using what is known as URL encoding. This is discussed in the CGI documentation found at NCSA and elsewhere in this document collection.
For detailed information on the different URL formats see:
ToC ~ Up ~ Prev ~ Next ~ Index |
Introduction to HTML © 1994-1998 by Ian Graham Last Update: 5 January 1998 |