<?xml version="1.0"?>
<?xml-stylesheet href="/transform" type="text/xsl"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bs="http://purl.org/ontology/bibo/status/" xmlns:ci="https://vocab.methodandstructure.com/content-inventory#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" lang="en" prefix="bibo: http://purl.org/ontology/bibo/ bs: http://purl.org/ontology/bibo/status/ ci: https://vocab.methodandstructure.com/content-inventory# dct: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ owl: http://www.w3.org/2002/07/owl# rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# xhv: http://www.w3.org/1999/xhtml/vocab# xsd: http://www.w3.org/2001/XMLSchema#" vocab="http://www.w3.org/1999/xhtml/vocab#" xml:lang="en">
  <head>
    <title property="dct:title">HTTP URL Path Parameter Syntax</title>
    <base href="https://doriantaylor.com/policy/http-url-path-parameter-syntax"/>
    <link href="../document-stats#EVeEXr9o4zcokNZ6UZcNcK" rev="ci:document"/>
    <link href="../elsewhere" rel="alternate bookmark" title="Elsewhere"/>
    <link href="../this-site" rel="alternate index" title="This Site"/>
    <link href="http://purl.org/ontology/bibo/status/published" rel="bibo:status"/>
    <link href="" rel="ci:canonical owl:sameAs" title="HTTP URL Path Parameter Syntax"/>
    <link href="../lexicon/#EzqXIsriaILFcWjXdS7FbI" rel="dct:audience" title="Software Developer"/>
    <link href="../person/dorian-taylor#me" rel="dct:creator" title="Dorian Taylor"/>
    <link href="file-extensions-in-http-url-paths" rel="dct:references prev" title="File Extensions in HTTP URL Paths"/>
    <link href="http-url-path-syntax-constraints" rel="dct:references up" title="HTTP URL Path Syntax Constraints"/>
    <link href="../lexicon/#EnewYu-MeZVXNc97q_-jAI" rel="dct:subject" title="Web Development"/>
    <link href="../person/dorian-taylor" rel="meta" title="Who I Am"/>
    <link about="../" href="../3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="../" href="../f07f5044-01bc-472d-9079-9b07771b731c" rel="alternate" type="application/atom+xml"/>
    <link about="../" href="../this-site" rel="alternate"/>
    <link about="../" href="../elsewhere" rel="alternate"/>
    <link about="../" href="../e341ca62-0387-4cea-b69a-cdabc7656871" rel="alternate" type="application/atom+xml"/>
    <link about="../verso/" href="../3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="../verso/" href="../this-site" rel="alternate"/>
    <link about="../verso/" href="../elsewhere" rel="alternate"/>
    <meta content="http-url-path-parameter-syntax" datatype="xsd:token" property="ci:canonical-slug"/>
    <meta content="No, wait: THIS is by far the most popular page on this site." name="description" property="dct:abstract"/>
    <meta content="2008-09-01T19:13:11+00:00" datatype="xsd:dateTime" property="dct:created"/>
    <meta content="http-url-path-parameter-syntax" property="dct:identifier"/>
    <meta content="2008-09-01T19:20:38+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2008-09-03T10:29:11+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2008-10-09T02:02:01+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-03-04T00:43:00+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2012-02-19T07:30:20+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2022-05-31T04:18:52+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta about="../person/dorian-taylor#me" content="Dorian Taylor" name="author" property="foaf:name"/>
    <meta content="summary" name="twitter:card"/>
    <meta content="@doriantaylor" name="twitter:site"/>
    <meta content="HTTP URL Path Parameter Syntax" name="twitter:title"/>
    <meta content="No, wait: THIS is by far the most popular page on this site." name="twitter:description"/>
    <object>
      <nav>
        <ul>
          <li>
            <a href="../cool-uris-dont-change" rev="dct:references" typeof="bibo:Note">
              <span property="dct:title">Cool URIs Don't Change</span>
            </a>
          </li>
          <li>
            <a href="file-extensions-in-http-url-paths" rev="dct:references" typeof="bibo:Report">
              <span property="dct:title">File Extensions in HTTP URL Paths</span>
            </a>
          </li>
          <li>
            <a href="http-url-path-syntax-constraints" rev="dct:references" typeof="bibo:Report">
              <span property="dct:title">HTTP URL Path Syntax Constraints</span>
            </a>
          </li>
          <li>
            <a href="../idiot-seo-savant" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">Idiot SEO Savant</span>
            </a>
          </li>
          <li>
            <a href="other-non-alpha-numeric-characters-in-http-urls" rev="dct:references" typeof="bibo:Report">
              <span property="dct:title">Other Non-Alpha-Numeric Characters in HTTP URLs</span>
            </a>
          </li>
          <li>
            <a href="../visualizing-paths-through-the-web" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">Visualizing Paths Through the Web</span>
            </a>
          </li>
          <li>
            <a href="../document-stats#EVeEXr9o4zcokNZ6UZcNcK" rev="ci:document" typeof="qb:Observation">
              <span>urn:uuid:55e117af-da38-4cdc-aa24-359e9465c35c</span>
            </a>
          </li>
        </ul>
      </nav>
    </object>
  </head>
  <body about="" id="EZmN32oefY3bojkRmLCIXJ" typeof="bibo:Report">
    <p>A <acronym title="Uniform Resource Identifier">URI</acronym> path parameter is part of a <em>path segment</em> that occurs after its <em>name</em>. Path parameters <a href="uri-path-and-query-parameter-semantics" title="URI Path and Query Parameter Semantics" rel="dct:references">offer a unique opportunity</a> to control the representations of resources. Since they can't be manipulated by standard <abbr title="World Wide Web">Web</abbr> forms, they have to be constructed out of band. Since they're part of the path, they're <em>sequential</em>, <a href="semantics-of-uri-query-strings" title="Semantics of URI Query Strings" rel="dct:references">unlike query strings</a>. Most importantly, however, their behaviour is not explicitly defined.</p>
    <p>When defining constraints for the syntax of path parameters, we can take these characteristics into account, and define parameters that stack sequentially, and each take multiple values.</p>
    <p>In the last paragraph of section 3.3, <a href="http://tools.ietf.org/html/rfc3986#section-3.3" title="RFC 3986 &#x2014; Uniform Resource Identifier (URI): Generic Syntax" rel="dct:references">The <acronym title="Uniform Resource Identifier">URI</acronym> specification</a> suggests employing the semicolon <samp>;</samp>, equals <samp>=</samp> and comma <samp>,</samp> characters for this task. Therefore:</p>
    <ul>
      <li>The semicolon <samp>;</samp> will delimit the parameters themselves. That is, anything in a path segment to the right of a semicolon will be treated as a new parameter, like this: <samp>/path/name;param1;p2;p3</samp>.</li>
      <li>The equals sign <samp>=</samp> will separate parameter <em>names</em> from their <em>values</em>, should a given parameter take values. That is, within a path parameter, everything to the right of an equals sign is treated as a value, like this: <samp>param=value;p2</samp>.</li>
      <li>The comma <samp>,</samp> will separate individual <em>values</em> passed into a single parameter, like this: <samp>;param=val1,val2,val3</samp>.</li>
      <li>This means that <span class="parenthesis" title="so don't do it">although it may be visually confusing</span>, parameter <em>names</em> can take commas but no equals signs, <em>values</em> can take equals signs but no commas, and <em>no part of the path segment</em> can take semicolons literally. All other sub-delimiters should be percent-encoded.</li>
      <li>This also means that <a href="other-non-alpha-numeric-characters-in-http-urls" title="Other Non-Alpha-Numeric Characters in HTTP URLs" rel="dct:references">one's opportunities for self-expression</a> with URI paths are further constrained.</li>
    </ul>
  </body>
</html>
