Home  >  Article  >  What is the url format?

What is the url format?

藏色散人
藏色散人Original
2020-12-11 10:35:178291browse

The full English name of the url format is Uniform Resource Locator, which refers to the network address; on the WWW, each information resource has a unified and unique address on the Internet. This address is called the URL, which is of the WWW Uniform resource locator flag.

What is the url format?

#The operating environment of this article: windows10 system, thinkpad t480 computer.

Recommended: "Programming Video"

The full English name of the url format is Uniform Resource Locator.

On the WWW, each information resource has a unified and unique address on the Internet. This address is called URL (Uniform Resource Locator, Uniform Resource Locator), which is the Uniform Resource Locator of the WWW. It refers to the network address.

URL consists of three parts: resource type, host domain name where the resource is stored, and resource file name.

can also be considered to be composed of 4 parts: protocol, host, port, path

The general syntax format of URL is:

(with square brackets [] is optional ):

protocol :// hostname[:port] / path / [;parameters][?query]#fragment

Format description

protocol(protocol)

Specifies the transport protocol used. The following table lists the valid scheme names for the protocol attribute. The most commonly used protocol is HTTP, which is also the most widely used protocol in the WWW.

file resources are files on the local computer. Format file:///, note that there should be three slashes after it.

ftp Access resources via FTP. Format FTP://

gopher Access this resource through the Gopher protocol.

http Access this resource via HTTP. Format HTTP://

https Access this resource via secure HTTPS. Format HTTPS://

mailto The resource is an email address, accessed via SMTP. Format mailto:

MMS By supporting the MMS (streaming media) protocol to play this resource. (Representative software: Windows Media Player) Format MMS://

ed2k Access this resource through P2P software that supports the ed2k (dedicated download link) protocol. (Representative software: eDonkey) Format ed2k://

Flashget Access this resource through P2P software that supports the Flashget: (dedicated download link) protocol. (Representative software: Express) Format Flashget://

thunder Access this resource through P2P software that supports the thunder (dedicated download link) protocol. (Representative software: Thunder) Format thunder://

news Access this resource through NNTP.

hostname

refers to the Domain Name System (DNS) hostname or IP address of the server where the resource is stored. Sometimes, the hostname can also be preceded by the username and password required to connect to the server (format: username:password@hostname).

port (port number)

Integer, optional, the default port of the scheme is used when omitted. Various transmission protocols have default port numbers, such as the default port of http is 80. If omitted on entry, the default port number is used. Sometimes for security or other considerations, the port can be redefined on the server, that is, a non-standard port number can be used. In this case, the port number cannot be omitted in the URL.

path (path)

A string separated by zero or more "/" symbols, generally used to represent a directory or file address on the host.

parameters

This is an optional option for specifying special parameters.

query

Optional, used to pass parameters to dynamic web pages (such as web pages produced using CGI, ISAPI, PHP/JSP/ASP/ASP.NET and other technologies), you can There are multiple parameters, separated by the "&" symbol, and the name and value of each parameter are separated by the "=" symbol.

fragment (information fragment)

String, used to specify the fragment in the network resource. For example, if there are multiple noun explanations in a web page, you can use fragment to directly locate a certain noun explanation.

The above is the detailed content of What is the url format?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn