I'm working in developing REST API for a WP based website. Endpoint is http://example.com/api.php
I've included wp-load.php
in the top of the file to access WP functions etc.
However, http://example.com/api.php
is loading normally in browser (not output as no parameter is passing). When I'm passing any parameters like http://example.com/api.php?items=books
I'm WordPress getting non found error page.
Most wired part is, when I've disabling Pretty Permalink, everything is working normal.
http://example.com
, which is the default domain for examples. Thanks.wp-load.php
to find answers on how to do it right.