I have a project written in phalcon with api folder: root/api/index.php , index.php file content: <?php
$app = new \Phalcon\Mvc\Micro(); $request = new \Phalcon\Http\Request();
$app->get('/test',function(){ echo "Hello from API !"; });
/**
- 404 Not Found Action */ $app->notFound(function () use ($app) { $app->response->setStatusCode(404, "Not Found")->sendHeaders(); echo '404 Not Found !'; });
$app->handle(); ?>
My domain is beta.ketqua.vn. API base url is: beta.ketqua.vn/api. When i try to test API using curl command line with this code: curl -i -X GET https://beta.ketqua.vn/api/test i retrieve "404 Not Found" from $app->notFound. In localhost in work very fine :(. How to fix that ???