Hi,
I don't understand the syntax of the following URL. Can anyone please help to advise me what it does? Thanks.
http://abc.php?page=anotherpage#
abc.php?page=anotherpage# -- question
Moderator: General Moderators
-
supernova122
- Forum Newbie
- Posts: 4
- Joined: Tue Apr 06, 2010 11:21 pm
-
supernova122
- Forum Newbie
- Posts: 4
- Joined: Tue Apr 06, 2010 11:21 pm
Re: abc.php?page=anotherpage# -- question
Sorry. I don't understand. Can you please tell me what it does in general? Thanks a lot.
Re: abc.php?page=anotherpage# -- question
In general,
(Stuff in the []s are optional.)
The scheme is the scheme. Like a protocol. Basically just some short identifier that says what kind of stuff comes next and how it should be treated.
The hierarchical part is a hierarchy. Could be anything, really.
The query allows for some sort of question. Format varies.
The fragment can be used to locate some part in the result, like a page number or bookmark.
In general, for HTTP, the scheme is "http"; the hierarchical part is two slashes, a domain, another slash, and possibly a bunch more stuff (often itself a hierarchy delimited with slashes); the query is a list of key=value pairs separated by ampersands; and the fragment is used for anchor links.
What you gave is invalid for HTTP, but works as a URI because
the scheme is "http", the hierarchical part is "//abc.php", the query is "page=anotherpage", and the fragment is empty.
Code: Select all
<scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]The scheme is the scheme. Like a protocol. Basically just some short identifier that says what kind of stuff comes next and how it should be treated.
The hierarchical part is a hierarchy. Could be anything, really.
The query allows for some sort of question. Format varies.
The fragment can be used to locate some part in the result, like a page number or bookmark.
In general, for HTTP, the scheme is "http"; the hierarchical part is two slashes, a domain, another slash, and possibly a bunch more stuff (often itself a hierarchy delimited with slashes); the query is a list of key=value pairs separated by ampersands; and the fragment is used for anchor links.
What you gave is invalid for HTTP, but works as a URI because
Code: Select all
http://abc.php?page=anotherpage#