I started to learn Phalcon Micro Application and generated the project using phalcon dev tools. I am facing problem for routes.
Below are the codes for .htaccess and my routes, but whenever i go to any other root other than "/" , it works, but for "/" route it goes to not found route.
Default .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
Public folder .htaccess
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
My routes in public/index.php are:
$app->get('/', function () {
echo "home";
});
$app->notFound(function(){
echo "not Found";
});
My project is in vagrant VM with the below url
http://192.168.50.4/api/
Can you please help me
Really Appreciate
Thanks,