Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Enjoy The TCP/IP Guide? Get the complete PDF!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP Application Layer Addressing: Uniform Resource Identifiers, Locators and Names (URIs, URLs and URNs)
                9  Uniform Resource Locators (URLs)

Previous Topic/Section
URL General Syntax
Previous Page
Pages in Current Topic/Section
1
2
345
Next Page
URL Relative Syntax and Base URLs
Next Topic/Section

URL Schemes (Applications / Access Methods) and Scheme-Specific Syntaxes
(Page 2 of 5)

World Wide Web / Hypertext Transfer Protocol URL Syntax (http)

The Web potentially uses most of the elements of the common Internet scheme syntax, as follows:

http://<user>:<password>@<host>:<port>/<url-path>?<query>#<bookmark>

As discussed in the overview, the Web is the primary application using URLs today. A URL can theoretically contain most of the common URL syntax elements, but in practice most are omitted. Most URLs contain only a host and a path to a resource. The port number is usually omitted, implying that the default value of 80 should be used. The “<query>” construct is often used to pass arguments or information from the client to the Web server.

I have provided full details on how Web URLs are used in a separate topic in the section on HTTP.

File Transfer Protocol URL Syntax (ftp)

The syntax for FTP URLs is:

ftp://<user>:<password>@<host>:<port>/<url-path>;type=<typecode>

FTP is an interactive command-based protocol, so it may seem odd to use a URL for FTP. However, one of the most common uses of FTP is to access and read a single, particular file, and this is what an FTP URL allows a client to do. The <user> and <password> are used for login and may be omitted for anonymous FTP access. The port number is usually omitted and defaults to the standard FTP control channel port, 21.

The “<url-path>” is interpreted as a directory structure and file name. The appropriate “CWD” (“change working directory”) commands are issued to go to the specified directory, and then a “RETR” (“retrieve”) command is issued for the named file. The optional “type” parameter can be used to indicate the file type: “a” to specify an ASCII file retrieval or “i” for an image (binary) file. The “type” parameter is often omitted from the URL, with the correct mode being set automatically by the client based on the name of the file.

For example, consider this URL:

ftp://ftp.hardwarecompanyx.com/drivers/widgetdriver.zip

This is equivalent to starting an FTP client, making an anonymous FTP connection to “ftp.hardwarecompanyx.com”, then changing to the “drivers” directory and retrieving the file “widgetdriver.zip”. The client will retrieve the file in binary mode because it is a compressed “zip” file.

It is also possible to use an FTP URL to get a listing of the files within a particular directory. This allows a user to navigate an FTP server's directory structure using URL links to find the file he or she wants, and then retrieve it. This is done by specifying a directory name for the <url-path> and using the “type” parameter with a “<typecode>” of “d” to request a directory listing. Again, the “type” parameter is usually omitted and the software figures out to send a “LIST” command to the server when a directory name is given in a URL.


Previous Topic/Section
URL General Syntax
Previous Page
Pages in Current Topic/Section
1
2
345
Next Page
URL Relative Syntax and Base URLs
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.