JimJim2000 JimJim2000 - 3 months ago 16
HTTP Question

HTTP/FTP: Does trailing slash in URL mean another resource

I have two URLs:




Are they different URLs or the same? The same question is and about FTP protocol


In the URI standard, the relevant section is Normalization and Comparison:

  1. After doing a simple string comparison, these URIs are not equivalent.

  2. After applying syntax-based normalization, these URIs are not equivalent.

  3. For scheme-based normalization, you have to refer to the specifications of the http/https and ftp URI schemes, and check if any scheme-specific rules are defined:

  4. For protocol-based normalization, you have to take something like redirects into account (in case of http).

tl;dr: The URIs are not equivalent.

Note that this is not the case for an empty path in HTTP(S) URIs, as the section linked above defines:

[…] an empty path component is equivalent to an absolute path of "/" […]

So the following URIs are equivalent:



By the way, for the protocol-based normalization, the standard gives your case as an example:

[…] For example, if they observe that a URI such as


redirects to a URI differing only in the trailing slash


they will likely regard the two as equivalent in the future. […]