Opened 13 years ago
Closed 13 years ago
#375 closed defect (fixed)
Incorrect wp-json.php URL when in sub-directory
| Reported by: | nikolov.tmw | Owned by: | rmccue |
|---|---|---|---|
| Priority: | normal | Milestone: | 2013 Final (1.0) |
| Component: | JSON REST API | Keywords: | |
| Cc: |
Description
If you have your WordPress files situated in a sub-directory(let's say /wordpress/) all of the URL's that come from get_json_url() would be like http://example.com/wordpress/wp-json.php - that's obviously not correct, since the rewrite rules don't include the "wordpress/" part.
The solution to this is really simple - just switch get_site_url() for get_home_url() in plugin.php#126 - pretty much the same function, but it returns the URL for the home page of the site, thus making the location of wp-json.php correct.
PS: I hope that's the correct place for this bug report, even though it's almost the end of GSoC.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for this, I realised this the other day but forgot to file the issue.