Cross-domain URL

Source: Internet
Author: User

Tags: character start URL code lock QQ chat get first to text PHP

Before describing how to cross the domain, let's get a sense of the concept: URL. The following is excerpted from Wikipedia.

Uniform Resource Locator (or Unified Resource Locator / location address ,URL address , etc., English:uniform/universal Resource Locator, Often abbreviated as a URL), sometimes referred to as the Web address ( URL ).

The standard format for Uniform Resource Locators is as follows:

Protocol type://server address (need to add port number if necessary)/path/file name

There are many types of protocols, such as: HTTP and HTTPS are the most commonly used for browsing Web pages, and there are ed2k and thunder,qq chat Tencent for downloading resources. Of course there are many other types of agreements, which are not listed here.

The Uniform Resource Locator for Hypertext Transfer Protocol (HTTP) will include five basic elements of information from the Internet in a simple address:

    1. Transfer Protocol.
    2. Server. (typically a domain name, sometimes an IP address, refers to the domain Name System (DNS) hostname or IP address of the server that holds the resource.) Sometimes, you can include the user name and password that you need to connect to the server before the host name, in the format: Username:password)
    3. Port number. (numerically, if the default value for HTTP ": 80" can be omitted)
    4. Path. (Each directory name in the path is distinguished by the "/" character)
    5. Inquire. (Get mode for form parameters, with "?" The character is the starting point, each parameter is separated by "&", and the parameter name and data are separated by "=", usually with the URL encoding of UTF8, avoiding the problem of character conflict)

which

    1. http, is the protocol;
    2. zh.wikipedia.org, is the server;
    3. is the network port number on the server;
    4. /w/index.php, is the path;
    5. Title=special:%e9%9a%8f%e6%9c%ba%e9%a1%b5%e9%9d%a2&printable=yes, is asking.

Most Web browsers do not require users to enter the "http://" section of the Web page, because most Web content is Hypertext Transfer Protocol files. Similarly, "A" is a common port number for Hypertext Transfer Protocol files, so it is not generally necessary to specify. In general, users simply type part of the Uniform Resource Locator (zh.wikipedia.org/wiki/special:%e9%9a%8f%e6%9c%ba%e9%a1%b5%e9%9d%a2).

Because the Hypertext Transfer Protocol allows the server to redirect the browser to another Web page address, many servers allow users to omit parts of the web address, such as www. Technically, the omitted page address is actually a different web address, and the browser itself cannot determine whether the new address is available, and the server must complete the redirected task.

Here is the server part of the URL, some of the information is also known as the domain name.

Take zh.wikipedia.org as an example ,org is the top-level domain name,wikipedia.org is a domain name,zh.wikipedia.org is a level two domain name. Of course, there is also information about Wikipedia as a first-class domain name, zh is called a two-level domain name, such as Wikipedia is so called, no matter what kind of argument, the key is to know that the domain name has such a division method. And so on, there are three level domain name, four level domain name and so on.

Cross-domain URL

Related Article

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.

Tags Index: