Skip to content

Handling URIs with a path component ending with the same segment term #107

Description

@csarven

Can there be more than one URI with a path component ending with the same segment term? No.

Path segments separated by slash (/) entail hierarchical containment. Path segments:

  • ending with a slash corresponds to a LDPC;
  • not ending with a slash corresponds to a LDPR that's not a LDPC.

Examples:

/foo/ exists =>

  • /foo cannot exist.

/foo/bar/baz exists =>

  • /foo/, /foo/bar/ exists.
  • /foo, /foo/bar, /foo/bar/baz/, /foo/bar/baz/qux,.. cannot exist.

Normally 404 status code is used when there is no representation for a resource. When a segment term is used as part of the last path segment of a resource, should there instead be a redirect (301) to it when the same segment term is used for a resource without a representation? For example:

  • If /foo/ exists, should request to /foo redirect to /foo/?
  • If /foo exists, should request to /foo/ redirect to /foo ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions