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

WordPress Trac noreply at wordpress.org
Sun Jan 1 16:33:15 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        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by ccprog):

 The error can be traced to [source:trunk/src/wp-includes/rest-api/class-
 wp-rest-server.php#L294 WP_Rest_Server::serve_request]:
 {{{#!php
 if ( empty( $path ) ) {
         if ( isset( $_SERVER['PATH_INFO'] ) ) {
                 $path = $_SERVER['PATH_INFO'];
         } else {
                 $path = '/';
         }
 }

 }}}

 `$_SERVER['PATH_INFO']` contains `/wp-json/` on my setup.

 While this is plausible if mod_rewrite is not active, the success on
 developer.wordpress.org raises the question if a webserver rewrite may or
 may not change the content of PATH_INFO?

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


More information about the wp-trac mailing list