我使用的是普通主机(即通过public_html访问网页,而不能访问php(apache)配置)。
所以我在这里做
- 已重命名我的web目录=>public_html
- 将app.php(prod应用程序)重命名为index.php
我还在我的页面(模板)中添加了一条名为"littlebird"的路线
问题
当我致电www.mywebsite.com/littlebird=>404页面未找到
但当我使用www.mywebsite.com/index.php/literbird时,一切都很好。
我最初的猜测是你没有打开mod_rewrite
。
但在我们的讨论中,我们发现您用其他东西替换了原来的.htaccess
。
原始.htaccess
可以通过以下地址找到:https://github.com/symfony/symfony-standard/blob/master/web/.htaccess
在我看来,DirectoryIndex
中似乎没有index.php
值。
尝试编辑位于littlebird
中的.htaccess
文件,并使用添加/更新它
DirectoryIndex index.php index.html