[wp-trac] [WordPress Trac] #39432: index.php/wp-json/ does not work
WordPress Trac
noreply at wordpress.org
Sun Jan 1 04:35:27 UTC 2017
#39432: index.php/wp-json/ does not work
--------------------------+-----------------------------
Reporter: ccprog | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
While you need mod_rewrite for discovery via http://example.com/wp-json/
to work, I run into problems without it. The Link resonse header then says
{{{
<http://example.com/index.php/wp-json/>; rel="https://api.w.org/"
}}}
but calling this results in
{{{
{"code":"rest_no_route","message":"No route was found matching the URL and
request method","data":{"status":404}}
}}}
The same error is returned on my public site https://browser-
unplugged.net/index.php/wp-json/ where rewrite is working. The response is
obviously given by the REST API. The REST API plugin was never installed,
and I did flush the rewrite rules as proposed in [ticket:39424]
For sites like developer.wordpress.org or demo.wp-api.org, the address
works.
http://example.com/index.php/index.php/?rest_route=/,
http://example.com/index.php/wp-json/wp/v2/ and all endpoints work as
expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39432>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list