URI and URL

Source: Internet
Author: User
Tags rfc

Compared to URIs (Uniform Resource Identifiers), we are more familiar with URLs (Uniform
Resource Locator, Uniform Resource Locator). URLs are using Web browsers and so on
The address of the Web page that you need to enter when accessing Web pages.

Uniform Resource Identifiers

The URI is an abbreviation for Uniform Resource Identifier. RFC2396 to these 3 single
The words are defined as follows.

Uniform

Provides a uniform format for easy handling of many different types of resources without the context
Environment to identify the access method specified by the resource. Additionally, add a new protocol scheme (such as
http: or ftp:) is also easier.

Resource

The definition of a resource is "anything that can be identified". In addition to document files, images, or services (e.g.
such as the weather forecast of the day) can be distinguished from other types, all can be used as resources. Other
, resources can be not only single, but also majority aggregates.

Identifier

Represents an object that can be identified. Also known as an identifier.
In summary, a URI is a positional identifier for a resource represented by a protocol scheme. Agreement
A scenario is the name of the protocol type used to access the resource.
When using the HTTP protocol, the Protocol scheme is HTTP. In addition, there are FTP,

mailto, Telnet, file, and so on. The standard URI protocol scheme has about 30 kinds, which are subordinate to
Internet resource management, non-profit society ICANN
Assigned Names and Numbers, Internet name and digital address assignment Agency)
IANA (internet Assigned Numbers Authority, internet number distribution Authority) management
Promulgated.

A URI identifies an Internet resource with a string, and the URL represents the location of the resource (connected
Location on the web). The visible URL is a subset of the URI.
Several URI examples are listed in "RFC3986: Uniform Resource Identifier (URI) common syntax"
as shown below.
Ftp://ftp.is.co.za/rfc/rfc1808.txt
Http://www.ietf.org/rfc/rfc2396.txt
Ldap://[2001:db8::7]/c=gb?objectclass?one
Mailto:[email protected]
News:comp.infosystems.www.servers.unix
tel:+1-816-555-1212
telnet://192.0.2.16:80/
urn:oasis:names:specification:docbook:dtd:xml:4.1.2

URI format

Represents the specified URI, using an absolute URI that covers all the necessary information, an absolute URL to
and relative URLs. A relative URL refers to the URL specified from the base URI in the browser.
Shaped like a/image/logo.gif.
Let's first look at the format of the absolute URI.

Use http: or https: To specify the protocol type when obtaining access to resources, such as protocol scheme names. No
The letter is case-sensitive, with a colon (:) appended to it.
You can also use data: or JavaScript: This class specifies the schema name of the data or script program.
Login information (authentication)
Specify the user name and password as necessary logon information for obtaining resources from the server side (identity
Certification). This option is optional.
Server address
Using an absolute URI must specify the server address to be accessed. The address can be similar
hackr.jp this DNS resolvable name, or 192.168.1.1 such IPv4 address
Name, or it can be a IPV6 address name enclosed in square brackets [0:0:0:0:0:0:0:1].
Server port number
Specifies the network port number of the server connection. This option is also optional, if the user omits it automatically
Use the default port number.
File path with hierarchy
Specifies the file path on the server to locate the specified resource. This is related to UNIX system files
The directory structure is similar.
Query string
For resources within the specified file path, you can use the query string to pass in any parameter
Number. This option is optional.
Fragment identifier
Using fragment identifiers can often mark a child resource in a retrieved resource (a file in the document
Location). However, the use of this method is not explicitly specified in the RFC. The item is also optional
Item

URI and URL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.