Earnings in the Internet permanently and regularly pay
An URL looks like this:
http://me:mypass@www.myhost.org:81/users/galactus/file.html ^ ^ ^ ^ ^ ^--- local URL part | | | | |------ port number | | | ---------------------- hostname of server, or IP address | | ----------------------------- password (optional) | -------------------------------- username (optional) --------------------------------------- protocol name
In most cases, the username, password and port number are omitted. It is also possible that the local URL part ends in a slash, in which case it is called a directory URL.
If the local URL starts with a slash, it is called an absolute local URL, otherwise it is called a relative (local) URL.
The "relative" comes from the fact that the URL is only valid relative to the URL of the current resource.
A relative URL is always a local URL. The first part is therefore always the same as that of the current URL. The relative URL is then turned into an absolute local URL with the following simple steps:
Current document: http://www.foo.com/users/galactus/index.html
Relative URL: myessay.html.
The full URL for this relative URL is http://www.foo.com/users/galactus/myessay.html.
Relative URL: pics/background.gif.
The full URL for this relative URL is http://www.foo.com/users/galactus/pics/background.gif.
Relative URL: ../cgi-bin/myscript.pl.
The full URL for this relative URL is http://www.foo.com/users/cgi-bin/myscript.pl.
Note that it is not necessarily true that the ../ bit in a relative URL refers to going "up" one directory on the server. It may often be the case, since that's the most simple and common way to do it, but the ../ applies to the URL, not the actual directory tree on the server.
As you can see in the last example, it is quite possible that ../ ends you in a totally different directory on the server.
Author: Arnoud "Galactus" Engelfriet <galactus@htmlhelp.com>