Next: Opaque Absolute URI's
Up: Absolute URI's
Previous: Absolute URI's
  Contents
A hierarchical absolute URI most commonly has the form
scheme://hostname[:port]/path/filename#fragment
The scheme indicates over what protocol the abstract or physical resource can be obtained. For
example, some of the common schemes are as follows
- http - Hypertext Transfer Protocol scheme.
- ftp - File Transfer Protocol scheme.
- https - Secure HTTP scheme
- gopher - Gopher schema for Gopher and Gopher+ services
The hostname indicates the computer on which the abstract or physical resource sits. For example,
in the hierarchical absolute URI
http://www.math.uio.no/faq/compression-faq/part1.html
the hostname is www.math.uio.no. In the hierarchical absolute URI
http://www.aei.mpg.de/index.html
the hostname is www.aei.mpg.de.
The port indicates a bit more detail as to the protocol involved in obtaining the abstract or physical
resource. To explain this we have to take a step back and talk about how computers communicate over
the net.
Figure:
Ye ole fashioned switchboard.
|
[width=7cm]switchboard
|
If you are old enough to remember the days in which telephone operators directed calls using one
of these museum pieces, see figure , then you're a bit older then I am, but the idea of switchboard
ports and computer ports is basically the same. Each computer has associated with it thousands of ports over
which it can talk to the outside world. Just like the physical ports of a switchboard, once a given computer port
is being used for a conversation, it can't be used for another conversation. To keep track of things each one
of these thousands of computer ports is given a number. A given schema, http say, has a standard port over
which communication takes place. (For http it's port 80.) If one is using the standard port for a given schema,
then one doesn't need to say anything about this detail, as it's implicit in the specification of the schema. For
example with the URI
http://www.math.uio.no/faq/compression-faq/part1.html
one need not specify that port 80 is being used as the http schema does it for you already. However, if you
want to use a non-standard port, say we wanted to use port 666 for http, then we have to actually specify
this. This is what the port part of a URI specifies. For example, the following hierarchical absolute URI
http://www.math.uio.no:666/faq/compression-faq/part1.html
indicates that one can obtain the named resource using the http protocol over the non-standard port 666,
the morning star would be proud.
The path portion of a hierarchical absolute URI specifies the directory of the resource. This directory
is resolved relative to the document root, a directory on the computer the URI specifies. So, for
example, if the document root on the computer www.math.uio.no is /user/eosphorus/,
then the hierarchical absolute URI
http://www.math.uio.no:666/faq/compression-faq/part1.html
has a path faq/compression-faq which is resolved to the path
/user/eosphorus/faq/compression-faq
on the computer www.math.uio.no.
The filename portion of a hierarchical absolute URI, you guessed it, specifies the file the URI refers to.
So, the following hierarchical absolute URI
http://www.math.uio.no:666/faq/compression-faq/part1.html
specifies the file part1.html.
Finally, the fragment portion of a hierarchical absolute URI specifies a certain part of the file to which
the URI refers. So, if the file part1.html is written so as to be divided into parts PartA, PartB,
and PartC, then we could refer to PartA, say, using the following URI
http://www.math.uio.no:666/faq/compression-faq/part1.html#PartA
Next: Opaque Absolute URI's
Up: Absolute URI's
Previous: Absolute URI's
  Contents
Andre Merzky
2004-05-13
|