Skip to content

Commit 12d4618

Browse files
authored
note about endpoints with 'ugly' permalinks
1 parent a61b9cb commit 12d4618

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Each of these concepts play a crucial role in using and understanding the WordPr
3333

3434
A route, in the context of the WordPress REST API, is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an "endpoint". To clarify: If we make a `GET` request to `http://oursite.com/wp-json/`, we will get a JSON response showing us what routes are available, and within each route, what endpoints are available. `/wp-json/` is a route itself and when a `GET` request is made it matches to the endpoint that displays what is known as the index for the WordPress REST API. We will learn how to register our own routes and endpoints in the following sections.
3535

36-
[info]In order for the REST API routes to work, you should have [Pretty Permalinks](https://codex.wordpress.org/Using_Permalinks) enabled on your Wordpress site.[/info]
36+
[info]If you're using [Ugly Permalinks](https://codex.wordpress.org/Using_Permalinks), you should pass the REST API endpoint as a query string parameter. Endpoint `http://oursite.com/wp-json/` in the example above becomes `http://oursite.com/?rest_route=/` in such case. [/info]
3737

3838
### Requests
3939

0 commit comments

Comments
 (0)