Skip to content

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

Closed
@csarven

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 ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions