[wp-trac] [WordPress Trac] #50478: "Plain" Permalink Settings makes WP API unreachable

WordPress Trac noreply at wordpress.org
Fri Jun 26 08:01:53 UTC 2020


#50478: "Plain" Permalink Settings makes WP API unreachable
--------------------------+----------------------
 Reporter:  fitmealat     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  5.4
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by swissspidy):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hi there

 "Plain permalinks" means all URL rewrites and pretty permalinks will be
 disabled, either because the user chose that option or the server does not
 support pretty perrmalinks.

 In these cases, `https://example.com/wp-json/wp/v2/` would  become
 `https://example.com/?rest_route=/wp/v2`

 If you are developing a plugin, use the `get_rest_url()` function which
 automatically handles both cases and will give you a correct URL.

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


More information about the wp-trac mailing list