【发布时间】:2016-12-24 22:20:34
【问题描述】:
我是 laravel 的新手,我只是尝试将每条路由中的 index.php 删除,例如 https://localhost/test/public/index.php/test1 到 https://localhost/test/public/test1 中。 我可以使用 mod_rewrite 代码来解决这个问题,但不起作用。 我在公用文件夹中的 .htaccess 文件中的代码如下:-
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
显示错误
The requested URL /test/public/test1 was not found on this server
【问题讨论】:
标签: php .htaccess mod-rewrite laravel-5.2