The general syntax of a URI consists of a hierarchical sequence of components, designated as a scheme, authority, path, query, and fragment.
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] hier-part = "//" authority path-abempty / path-absolute / path-rootless / path-empty
Schema and path components are required, although the path may be empty (no characters). When power is present, the path must either be empty or start with a slash ("/"). when there is no authority, the path cannot begin with two slash characters ("//"). These restrictions lead to five different ABNF rules for the path (section 3.3), only one of which will match any using a URI reference.
The following are two example URIs and their component parts: foo://example.com:8042/over/there?name=ferret#nose \_/ \______________/\_________/ \_________/ \__/ | | | | | scheme authority path query fragment | _____________________|__ / \ / \ urn:example:animal:ferret:nose
source share