Make WordPress Core

Opened 3 years ago

Last modified 5 months ago

#54387 new enhancement

trailing slash in the url /wp-json

Reported by: superpoincare's profile superpoincare Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 5.8.1
Component: REST API Keywords: dev-feedback
Focuses: Cc:

Description

The url with wp-json doesn't redirect one to another.

Won't it be better if there's a unique url, with one with/without trailing slash permanent.

For example:

https://www.example.com/wp-json and
https://www.example.com/wp-json/

are different addresses whereas one should redirect to the other (?).

Change History (2)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to REST API

#2 @antonvlasenko
5 months ago

  • Keywords dev-feedback added

While I like the idea, there might be issues with backward compatibility.
For example, curl does not follow redirects by default, so a redirect would not work unless curl is explicitly told to follow redirects.

Note: See TracTickets for help on using tickets.