[wp-trac] [WordPress Trac] #37020: get_rest_url() returns wrong path if the site and home url's are different
WordPress Trac
noreply at wordpress.org
Mon Jun 6 00:40:41 UTC 2016
#37020: get_rest_url() returns wrong path if the site and home url's are different
--------------------------+----------------------
Reporter: adamf321 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: REST API | Version: trunk
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Comment (by rmccue):
Replying to [comment:2 adamf321]:
> I think the api should use `site_url()` and it does. For example:
I think you may have your site misconfigured? `site_url()` is the location
of WordPress' files and `wp-admin`, `home_url()` is the location of your
frontend, including all rewrites, and is also where the API lives. Using
`home_url()` is intentional behaviour, and is required for rewrites to
work.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37020#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list