[wp-trac] [WordPress Trac] #39432: index.php/wp-json/ does not work

WordPress Trac noreply at wordpress.org
Tue Jan 17 05:39:17 UTC 2017

#39432: index.php/wp-json/ does not work
 Reporter:  ccprog        |       Owner:  rmccue
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.7.2
Component:  REST API      |     Version:  4.7
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
Changes (by rmccue):

 * status:  accepted => closed
 * resolution:   => fixed


 In [changeset:"39923"]:
 #!CommitTicketReference repository="" revision="39923"
 REST API: Correctly serve the index with PATH_INFO

 When hitting the index, untrailingslashit() would make the REST route
 empty, which would then use the fallback inside WP_REST_Server. This isn't
 a problem most of the time, but WP_REST_Server contains a fallback to
 PATH_INFO. Combined with PATH_INFO permalinks, this would give a 404 on
 the API index, as it attempts to look up a route for "/wp-json/".

 Props ccprog.
 Fixes #39432.

Ticket URL: <https://core.trac.wordpress.org/ticket/39432#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list