Sei sulla pagina 1di 3

The components of a URL A URL (Uniform Resource Locator) is a specific type of URI (Universal Resource Identifier).

A URL normally locates an existing resource on the Internet. A URL is used when a Web client makes a request to a server for a resource. The concepts of the URI and the URL are defined by the Internet Society and IETF (Internet Engineering Task Force) Request for Comments document RFC 2396, Uniform Resource Identifiers (URI): Generic Syntax (http://www.ietf.org/rfc/rfc2396.txt). Briefly, a URI is defined as any character string that identifies a resource. A URL is defined as those URIs that identify a resource by its location or by the means used to access it, rather than by a name or other attribute of the resource. A URL for HTTP (or HTTPS) is normally made up of three or four components: 1. A scheme. The scheme identifies the protocol to be used to access the resource on the Internet. It can be HTTP (without SSL) or HTTPS (with SSL). 2. A host. The host name identifies the host that holds the resource. For example, www.example.com. A server provides services in the name of the host, but there is not a one-to-one mapping between hosts and servers. Host names explains more about host names. Host names can also be followed by a port number. Port numbers explains more about these. Well-known port numbers for a service are normally omitted from the URL. Most servers use the well-known port numbers for HTTP and HTTPS , so most HTTP URLs omit the port number.

3. A path. The path identifies the specific resource within the host that the Web client wants
to access. For example, /software/htp/cics/index.html. 4. A query string. If a query string is used, it follows the path component, and provides a string of information that the resource can use for some purpose (for example, as parameters for a search or as data to be processed). The query string is usually a string of name and value pairs, for example, q=bluebird. The scheme and host components of a URL are not defined as case-sensitive, but the path and query string are case-sensitive. Usually, the whole URL is specified in lower case. The components of the URL are combined and delimited as follows: scheme://host:port/path?query The scheme is followed by a colon and two forward slashes. If a port number is specified, that number follows the host name, separated by a colon. The path name begins with a single forward slash. If a query string is specified, it is preceded by a question mark. Figure 1. Syntax of an HTTP URL .-:80-----. >>-http://--+-host name--+--+---------+--/--path component-----> '-IP address-' '-:--port-' >--+-----------------+---------------------------------------->< '-?--query string-' This is an example of an HTTP URL: http://www.research.ibm.com/software/htp/cics/index.html If a port number was specified, the URL would be: http://www.research.ibm.com:1030/software/htp/cics/index.html

A URL can be followed by a fragment identifier. The separator used between the URL and the fragment identifier is the # character. A fragment identifier is used to point a Web browser to a reference or function within the item that it has just retrieved. For example, if the URL identifies an HTML page, a fragment identifier can be used to indicate a subsection within the page, using the ID of the subsection. In this case, the Web browser normally displays the page to the user so that the subsection is visible. The action taken by the Web browser for a fragment identifier differs depending on the media type of the item and the defined meaning of the fragment identifier for that media type. Other protocols, such as File Transfer Protocol (FTP) or Gopher, also use URLs. The URLs used by these protocols may have a different syntax to the one used for HTTP. Web sites are found by their addresses. Each web site has a URL, or Uniform Resource Locator, assigned to it. This is how a URL is broken down: http://websearch.about.com/od/dailywebsearchtips/qt/dnt0526.ht m is our example. http://: type of file domain name: location of the file's web server is at websearch.about.com. backslash,then file name: path or directory on the computer to this file; which in our case is "od/dailywebsearchtips/qt". You're just basically moving from sub-directory to sub-directory here. name of file: name of file, usually ending in .html or .htm. My file name is "dnt0526". A URL is also known as a Web address. URL - Uniform Resource Locator Meaning of URL Uniform Resource Locator, is a string of characters used to represent and identify a page of information on the World Wide Web that is used by an web browser such as Netscape or Internet Explorer to find HTTP, FTP, telnet, gopher and other resources on the Internet. The first part of the address lets you know what protocol to use. If you were told to visit the URL "ftp://ftp.download.com/readme.txt", you would be using the File Transfer Protocol (FTP) to download the file "readme.txt" from a remote computer. If the URL was "http://10.0.0.1/faq.html", you would be using Hypertext Transfer Protocol to read the document "faq.html" on the Web. The second part of the address specifies the domain name or the IP address or the where the resource is located. In the above example, FTP was used to retrieve a document called "readme.txt" from a computer or server that has the domain name "download.com". Sometimes a domain name is not registered for an IP Address. In that case you would need to memorize a computer's IP address. In the second example, HTTP was used to locate a document called "faq.html" from a computer whose Internet Protocol address is 10.0.0.1. It is much easier to remember a domain name rather than an IP address when typing out URLs. The concept of a URL was introduced in late 1990. At that time, it was called a hypertext name or document name. URL stands for Uniform Resource Locator, which means it is a uniform (same throughout the world) way to locate a resource (file or document) on the Internet. The URL specifies the address of a file and every file on the Internet has a unique address. Web software, such as your browser, use the URL to retrieve a file from the computer on which it resides. The actual URL is a set of four numbers separated by periods. An example of this would be 202.147.23.8 but as these are difficult for humans to use, addresses are represented in alphanumeric form that is more descriptive and easy to remember. Thus, the URL of my site which is URL 209.164.80.192 can also be

written as www.simplygraphix.com. The Internet Domain Name System translates the alphanumerical address to numeric. Format of a URL: Protocol://site address/path/filename For example, the URL of my company site is: http://www.simplygraphix.com/ and a typical page on this site would be: http://www.simplygraphix.com/portfolio/4.html The above URL consist of: Protocol: http Host computer name: www Domain name: simplygraphix Domain type: com Path: /portfolio File name 4.html Protocols In addition to the http protocol (mentioned above), there are a few other protocols on the Internet. File: Enables a hyperlink to access a file on a local system. FTP: Used to download files from remote machines. Gopher: Helps in accessing a gopher server. mailto: Calls SMTP (the Simple Mail Transport Protocol) and enables a hyperlink to send an addressed email message. news: helps in accessing a USENET newsgroup. telnet: Provides the means for a hyperlink to open a telnet session on a remote computer. Site Address The site address consists of the host computer name, the domain name and the domain type. The domain name should be descriptive for easy comprehension and is usually the name of the organization or company. There are various domain types. Some of them are listed below: com: specifies commercial entities net: highlights networks or network providers org: organizations (usually non-profit) edu: colleges and universities (education providers) gov: government agencies mil: military entities of the United States of America The general format of such URLs is: machine name.domain name.domain type.country code. Domain types can also be different for different countries. For example, an educational site can have the domain name www.school.ac.uk in the United Kingdom. Thus ac (academic) is used instead of edu. Similarly com is represented as co for Indian domain names. Path Name Path name specifies the hierarchic location of the said file on the computer. For instance, in http://www.simplygraphix.com/portfolio/4.html the file 4.html is located in portfolio subdirectory under the server root directory.

Potrebbero piacerti anche