China Naming Network - Ziwei Dou Shu - What's the website address?

What's the website address?

A URL is a uniform resource locator, which is the address of a standard resource on the Internet. Every file on the Internet has a unique URL, which contains information indicating the location of the file and how the browser should handle it.

The basic URL includes: mode (or protocol), server name (or IP address/web address), path and file name. The protocol part is separated by "//",such as "protocol://authorization/path? Query ". Its general syntax format is: protocol://host name [:port]/path/[; Parameter] [? Query] # Fragments

Extended data

URL composition structure:

The first part: scheme, which tells the browser how to handle the file to be opened. The most commonly used mode is Hypertext Transfer Protocol (abbreviated as HTTP), which can be used to access the network. When we enter the URL in the address bar, we don't need to enter the protocol part, and the browser will automatically supplement the default HTTP protocol. ?

There are other agreements, such as "business organization" and ". Org "is a non-profit organization. ".gov" refers to government agencies. ".edu stands for educational and scientific research institutions. Sometimes, some subsidiaries of the head office or other product websites of the company will use second-level domain names similar to this domain name.

Sometimes, a URL ends with a slash "/"without giving a file name. In this case, the URL refers to the default file in the last directory in the path (usually corresponding to the home page), usually called index.html or default.htm.

URL classification:

URL can be divided into absolute and relative, in which absolute URL shows the complete path of the file, which means that the location of the absolute URL itself has nothing to do with the location of the actually referenced file; Relative URL describes the location of the target folder with the location of the folder containing the URL itself as a reference point.

If the target file is in the same directory as the current page (that is, the page containing URL), the relative URL of the file is only the file name and extension. If the target file is located in a subdirectory of the current directory, its relative URL is the subdirectory name, followed by a slash, and then the file name and extension of the target file.

If you want to refer to a file in a higher directory in the file hierarchy, use two periods and a slash. You can combine and reuse two periods and a slash to refer to any file on the hard disk where the current file is located. Generally speaking, you should always use relative URLs for files on the same server, which is easier to enter and more convenient when transferring pages from the local system to the server. As long as the relative position of each file remains the same, the link is still valid.

References:

Website-Baidu Encyclopedia