URL syntax for URLs

Source: Internet
Author: User

First, the syntax of the URL

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/81/wKioL1cDOFCx-M3zAABI8V8PcMY338.png "title=" Web.png "alt=" Wkiol1cdofcx-m3zaabi8v8pcmy338.png "/>


Agreement

-The full format of the URL

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/81/wKioL1cDOLaBlKBpAAARpD9xfaE535.png "title=" Web.png "alt=" Wkiol1cdolablkbpaaarpd9xfae535.png "/>

-Scheme: scheme that specifies which protocol gets the specified resource from the server; the scheme name is not case-sensitive. Common scenarios: HTTP, HTTPS, FTP, MAILTO, RTSP, FILE, NEWS, Telnet, and more


Host/port number

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/84/wKiom1cDOHfw5xRZAAATav5mgMc035.png "title=" Web.png "alt=" Wkiom1cdohfw5xrzaaatav5mgmc035.png "/>

-Host: hostname, IP address or domain name of the server where the resource resides (requires DNS to be converted to an IP address)

-Port: Port number, each service on the server corresponding to a listening port number

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/81/wKioL1cDOYKg1kXWAAAZe1IeXtg820.png "title=" Web.png "alt=" Wkiol1cdoykg1kxwaaaze1iextg820.png "/>

-Strictly speaking, a service program provided externally in a computer can be bound to any idle port, thereby enabling the task of listening for client connection requests.

-Common protocols set some default port numbers and should try to avoid mixing

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/84/wKiom1cDOSOA2KIVAAB9Yk8qpaQ711.png "title=" Web.png "alt=" Wkiom1cdosoa2kivaab9yk8qpaq711.png "/>


User name/password

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/81/wKioL1cDOe3ARfJiAAAUXUXWipk542.png "title=" Web.png "alt=" Wkiol1cdoe3arfjiaaauxuxwipk542.png "/>

-User: Username, some programs need to specify user name when accessing resources, default value is AnonyMouse

-PWD: Password, default value is <e-mail> address

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/84/wKiom1cDOYyTu0KkAAAegDWlaFY304.png "title=" Web.png "alt=" Wkiom1cdoyytu0kkaaaegdwlafy304.png "/>


Path

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/84/wKiom1cDOjDCbF00AAATJii9g5o977.png "title=" Web.png "alt=" Wkiom1cdojdcbf00aaatjii9g5o977.png "/>

-Path: path, local name of the resource on the server, separated by a slash (/) from the preceding URL component

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/81/wKioL1cDOxqTi33jAAAenKAdu-g446.png "title=" Web.png "alt=" Wkiol1cdoxqti33jaaaenkadu-g446.png "/>


Parameters

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/84/wKiom1cDOpaD9oplAAATzqLtJYc941.png "title=" Web.png "alt=" Wkiom1cdopad9oplaaatzqltjyc941.png "/>

-PARAMS: parameters, some scenarios use parameters to specify input parameters, each with a "name/value pair" form, a URL can have multiple such "name/value pairs", using semicolons (;) delimited

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/81/wKioL1cDO43xdVwQAAAfUQp7E2o840.png "title=" Web.png "alt=" Wkiol1cdo43xdvwqaaafuqp7e2o840.png "/>


Query string

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7E/84/wKiom1cDOv6yOQhBAAATTWU9dkc527.png "title=" Web.png "alt=" Wkiom1cdov6yoqhbaaattwu9dkc527.png "/>

-Query: Queries strings, some scenarios use query strings to pass parameters to activate applications such as databases, bulletin boards, search engines, and other Internet gateways. Query string contents are not formatted, use? separate from other components

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7E/81/wKioL1cDPAbRG-8aAAAcobavA5U470.png "title=" Web.png "alt=" Wkiol1cdpabrg-8aaaacobava5u470.png "/>


Anchor Point (Bookmark)

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/84/wKiom1cDO3rRCoOZAAARjiBhW8Q875.png "title=" Web.png "alt=" Wkiom1cdo3rrcoozaaarjibhw8q875.png "/>

-FRAG: Fragment, also known as anchor (anchor point)/tag (bookmark), refers to the name of a part of a resource. When referencing an object, the Frag field is not delivered to the server, which is used internally by the client, separated by # from other parts

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/81/wKioL1cDPJOhRbxjAAAcMERBEYI697.png "title=" Web.png "alt=" Wkiol1cdpjohrbxjaaacmerbeyi697.png "/>


Relative URL

-Two types of URLs

-absolute URL: Starts with the scheme and contains all the information required to access the resource

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/81/wKioL1cDPNzQqIsBAAAR6EpqkOY617.png "title=" Web.png "alt=" Wkiol1cdpnzqqisbaaar6epqkoy617.png "/>

-relative URL: Does not start with a scheme, the URL itself contains incomplete information, must refer to another URL (base, base URL) to determine its full content information

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/84/wKiom1cDPB_jEyoTAABT2Ua-gV8961.png "title=" Web.png "alt=" Wkiom1cdpb_jeyotaabt2ua-gv8961.png "/>


Summary: This chapter mainly introduces the URL syntax of URLs


This article from the "Flying Ants" blog, declined to reprint!

URL syntax for URLs

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.