Skip to content
Greg Bowler edited this page Jul 3, 2018 · 19 revisions

A URI (Universal Resource Identifier) is a sequence of characters that identify the World Wide Web request being made. Sometimes referred to as a URL (Universal Resource Locator) or URN (Universal Resource Name), with extremely subtle differences, we shall use the term URI for consistency with PHP's internal naming conventions.

A simple URI https://www.example.com/colour/red is made up of the following parts:

  • https - the URI scheme / protocol being used to make the request
  • www.example.com - the host (otherwise referred to as the hostname)
  • /colour/red - the path

A complex URI https://henry:[email protected]:8301/colour/red?sort=price&filter=new#options is made up of the following parts:

  • https - the URI scheme / protocol being used to make the request
  • henry:s3cr3t - the user info
  • www.example.com - the host (otherwise referred to as the hostname)
  • 8301 - the port
  • /colour/red - the path
  • sort=price&filter=new - the query or querystring
  • option - the fragment
Clone this wiki locally