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.
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.