Framify

URL

URL Syntax

In a URL, there are some required portions and some optional portions, as indicated in the sample syntaxes below (bold indicates required):

<protocol>://<host>:<port>/<file>#<location>
ftp://<username>:<password>@<host>:<port>/<file>
mailto:<address>?<parameters>

URL Description

"URL" stands for "Uniform Resource Locator" (not "Universal Resource Locator," as it is sometimes stated), and it is a consistent way of specifying which file you're looking for, where that file is, and how to get that file. There are some required portions and some optional portions, as indicated below (bold indicates required):
<protocol>
The protocol specifier indicates the communication method to use when attempting to access the associated file. The most common protocols are:

http Stands for "Hypertext Transfer Protocol." This is the most common protocol used by World Wide Web browsers, and is the protocol used for accessing websites and web pages in typical "surfing" mode. http is also the default protocol for web browsers, so if you just type something like "www.arnspub.com" into the Location field of your browser, it will notice that no protocol specifier was included, and automatically prepend "http://".
ftp Stands for "File Transfer Protocol." As its name implies, this is a protocol for copying files from one location on the internet to another.
mailto Brings up a mail-composition window and does the mechanics of sending the email when indicated. This form of URL is unique in that the protocol specifier is followed by only a ":" instead of a "://", as all the other protocols are.
gopher This is another protocol for copying files from one location on the internet to another.
file Indicates a file on your local system; that is, no internet connection is required to access such a file. Typically used during website development, before a site is placed on a webserver for public access.
WAIS Stands for "Wide-Area Information Services." Specifies a file on a WAIS server.
telnet Specifies a telnet connection; a terminal emulator that allows you to log into a remote machine and execute commands on it. Because of security reasons, this form of access is often restricted on public servers to those who have been granted specific permission.
news Specifies a protocol for reading USENET news (a.k.a. "Notes"), a worldwide bulletin-board system that allows people to ask questions, respond to others' comments, etc. This was the forerunner of today's "chat rooms."

<username>
Used only for file-copying; e.g., non-anonymous FTP copies.

<password>
Used only for file-copying; e.g., non-anonymous FTP copies.

<host>
This specifies the internet-connected computer on which the desired file resides. The host's name includes the machine's name, plus any required domain and subdomain specifiers; for example, www.arnspub.com.

Alternatively, the host may be specified by its IP (Internet Protocol) address, which is a series of four decimal integers in the inclusive range of 0-255; for example, 208.234.7.168.

<port>
This specifies the "port number" through which the connection should take place. By default, the port number for HTTP accesses is port 80, so specifying a port number is only required if the port is not the default. For example, www.arnspub.com is identical to www.arnspub.com:80.

<file>
This specifies the name of the file through you wish to access. Included in the file name, if necessary, is the pathname (the series of intermediate directory names) required to specify how to get to the desired file. For example, if you want a file named "Forecast.html", which is in a directory named "Business", which is itself in another directory named "Documents", which is at the top (root) of the webserver's directory structure, the <file> specifier would be "Documents/Business/Forecast.html".

If no <file> is specified, the webserver delivers the default file, typically named "index.html" or sometimes "default.html". (The suffix ".htm" is used on machines that can't handle four-letter suffixes.)

<location>
This specifies the desired viewing location in the file you wish to access. For example, if you had a file named "Forecast.html" with a short-range forecast section and a long-range forecast section, and you wanted to be able to go directly to the long-range section--which starts about halfway through the file--you could place a location identifier around some text already in the file: <a name="LongRange"><h2>Long-Range Forecast</h2></a> . . .and then the URL to go directly to this location in the file would be similar to: http://www.myhost.com/Forecast.html#LongRange

<address>
This specifies the electronic-mail address of the recipient of the message.

<parameters>
This specifies an ampersand-separated list of optional parameters for the email message being created. Parameters include subject, cc, and bcc.

URL Examples

To access the Arns Publishing website at its top level:
    http://www.arnspub.com

To access the syntax diagram for <td>, which is partway down the <table> page in the HTML Quick Reference:
    http://www.arnspub.com/QuickRef/table.html#td

To download a GIF file via non-anonymous FTP from the Arns Publishing FTP site (the username and password are the same in this example):
    ftp://arnsftp:arnsftp@ftp.arnspub.com/ArrowRight.gif

To download a shareware/freeware Macintosh program from the University of Michigan's gopher site:
    gopher://gopher.archive.umich.edu:7055/11/mac

To send email to multiple people at Arns Publishing and Design, click this URL and note that the fields in the resulting email message are automatically filled out (this URL is actually one long line; it is printed here on multiple lines merely for human readability):
    mailto:davea@arnspub.com?subject=Sample Email Parameters&     cc=arnspub@arnspub.com,kathy@arnspub.com,matt@arnspub.com&     bcc=webmaster@arnspub.com


Last Modified: Thursday, 24-Dec-2009 14:41:56 MST