RFC 1808 (rfc1808) - Page 3 of 16
Relative Uniform Resource Locators
Alternative Format: Original Text Document
RFC 1808 Relative Uniform Resource Locators June 1995
:///;?#
each of which, except , may be absent from a particular URL.
These components are defined as follows (a complete BNF is provided
in Section 2.2):
scheme ":" ::= scheme name, as per Section 2.1 of RFC 1738 [2].
"//" net_loc ::= network location and login information, as per
Section 3.1 of RFC 1738 [2].
"/" path ::= URL path, as per Section 3.1 of RFC 1738 [2].
";" params ::= object parameters (e.g., ";type=a" as in
Section 3.2.2 of RFC 1738 [2]).
"?" query ::= query information, as per Section 3.3 of
RFC 1738 [2].
"#" fragment ::= fragment identifier.
Note that the fragment identifier (and the "#" that precedes it) is
not considered part of the URL. However, since it is commonly used
within the same string context as a URL, a parser must be able to
recognize the fragment when it is present and set it aside as part of
the parsing process.
The order of the components is important. If both and
are present, the information must occur after the
.
2.2. BNF for Relative URLs
This is a BNF-like description of the Relative Uniform Resource
Locator syntax, using the conventions of RFC 822 [5], except that "|"
is used to designate alternatives. Briefly, literals are quoted with
"", parentheses "(" and ")" are used to group elements, optional
elements are enclosed in [brackets], and elements may be preceded
with * to designate n or more repetitions of the following
element; n defaults to 0.
This BNF also describes the generic-RL syntax for valid base URLs.
Note that this differs from the URL syntax defined in RFC 1738 [2] in
that all schemes are required to use a single set of reserved
characters and use them consistently within the major URL components.
Fielding Standards Track