{"action":"created","issue":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/1389","labels_url":"https://api.github.com/repos/WP-API/WP-API/issues/1389/labels{/name}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/1389/comments","events_url":"https://api.github.com/repos/WP-API/WP-API/issues/1389/events","html_url":"https://github.com/WP-API/WP-API/issues/1389","id":93214610,"number":1389,"title":"404 when passing args to the API","user":{"login":"webline","id":1628772,"avatar_url":"https://avatars.githubusercontent.com/u/1628772?v=3","gravatar_id":"","url":"https://api.github.com/users/webline","html_url":"https://github.com/webline","followers_url":"https://api.github.com/users/webline/followers","following_url":"https://api.github.com/users/webline/following{/other_user}","gists_url":"https://api.github.com/users/webline/gists{/gist_id}","starred_url":"https://api.github.com/users/webline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webline/subscriptions","organizations_url":"https://api.github.com/users/webline/orgs","repos_url":"https://api.github.com/users/webline/repos","events_url":"https://api.github.com/users/webline/events{/privacy}","received_events_url":"https://api.github.com/users/webline/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WP-API/WP-API/labels/Reporter%20Feedback","name":"Reporter Feedback","color":"eb6420"},{"url":"https://api.github.com/repos/WP-API/WP-API/labels/Support","name":"Support","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-06T07:44:46Z","updated_at":"2015-07-21T12:07:38Z","closed_at":"2015-07-21T12:07:38Z","body":"Hi,\r\n\r\nI defined a custom route with register_routes - works fine. Now I can access the REST API with:\r\n\r\nmydomain.com/wphhv/test\r\n\r\nThe API returns JSON too. So far no problems.\r\n\r\nBut when I add a parameter to my URL - like:\r\n\r\nmydomain.com/wphhv/test?val1=1234&val2=abcd\r\n\r\nThe API returns an 404 error all the time (checked with http://jsonformatter.curiousconcept.com - just entering the URL into a browser shows no error, but the correct data. When I access the API from an iOS client, I run into the 404 error too).\r\n\r\nThe wordpress permalink structure is set to \"Post name\".\r\n\r\nAny idea what’s going wrong?\r\n\r\nBest regards,\r\n\r\nDetlef\r\n\r\nP.S.: with\r\ncurl -I http://mydomain.com/wphhv/test?val1=1234&val2=abcd\r\nI get\r\nHTTP/1.1 404 Not Found\r\n\r\nwith\r\ncurl -I http://mydomain.com/wphhv/test\r\n\r\nI get\r\nHTTP/1.1 200 OK\r\n\r\nP.P.S.: here is my htaccess setup:\r\n\r\n<IfModule mod_rewrite.c>\r\nRewriteEngine On\r\nRewriteBase /\r\nRewriteRule ^index\\.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . /index.php [L]\r\n</IfModule>\r\n\r\nP.P.S.: it is not the GET parameter syntax in general because mydomain.com/wp-json/posts?type[]=project works fine.\r\n\r\nAll facts:\r\n- WordPress 4.2.2\r\n- the PlugIn is up and running\r\n- basic functions work\r\n- custom routes work\r\n- passing get parameters to a custom route return the HTTP status 404\r\n\r\n(this is a re-post of a support forum entry at wordpress.org - don't know what's the better place)"},"comment":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/comments/123285461","html_url":"https://github.com/WP-API/WP-API/issues/1389#issuecomment-123285461","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/1389","id":123285461,"user":{"login":"webline","id":1628772,"avatar_url":"https://avatars.githubusercontent.com/u/1628772?v=3","gravatar_id":"","url":"https://api.github.com/users/webline","html_url":"https://github.com/webline","followers_url":"https://api.github.com/users/webline/followers","following_url":"https://api.github.com/users/webline/following{/other_user}","gists_url":"https://api.github.com/users/webline/gists{/gist_id}","starred_url":"https://api.github.com/users/webline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webline/subscriptions","organizations_url":"https://api.github.com/users/webline/orgs","repos_url":"https://api.github.com/users/webline/repos","events_url":"https://api.github.com/users/webline/events{/privacy}","received_events_url":"https://api.github.com/users/webline/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T12:07:38Z","updated_at":"2015-07-21T12:07:38Z","body":"this one works:\r\n$routes['/wphhv/login/(?P<name>\\w+)/(?P<kw>\\w+)'] = array(\r\n\r\nusing mydomain.com/wphhv/login/1234/abcd instead of mydomain.com/wphhv/login?val1=1234&val2=abcd"}}