Answer the question
In order to leave comments, you need to log in
Why is the route not working in Phalcon?
I am mastering the Phalcon framework in order to use it for REST. But, it seems from scratch, there was a problem with setting up routing.
Created a simple script:
/dev/rest/reports/index.php
<?
use Phalcon\Mvc\Micro;
$app = new Micro();
echo 1;
$app->get(
'/',
function () {
echo 2;
}
);
$app->handle();
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
As a result, it turned out to be the version of the module. It was version 4.0.0-alpha.3.
After downgrading to 3.4.3 the code worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question