我开始学习Phalcon Micro Application,并使用phalcon开发工具生成了该项目。 我面临路线问题。微应用Phalcon“/”路由重定向到Not not found
以下是对的.htaccess和我的路由代码,但每当我去以外的任何其他根“/”,它的工作原理,但对于“/”路线它去找不到路线。
默认的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
公共文件夹的.htaccess
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
我的公共/ index.php的路线是:
$app->get('/', function() {
echo "home";
});
$app->notFound(function(){
echo "not Found";
});
我的项目是在漂泊不定的VM与以下url
http://192.168.50.4/api/
能否请你帮我
真的很感激
感谢,
什么ü时得到的http:// 19 2.168.50.4? –
嗨扎勒,我得到流浪框的默认页面。我的项目在api文件夹中。 – user280960