当 Laravel 路由名称和 public 下文件夹重名时解决方法
因为用了这个扩展不得不重名
博客:Editor.md For Laravel 5
修改public目录下的.htaccess文件
定位到:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
原本意思是:如果不是目录!-d、也不是文件!-f,那么解析到index.php
修改为
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
现在表示:如果不是文件!-f,那么解析到index.php
(从某种意义上!-d已经没用了)
不知道各位有没有更好的解决方案
推荐文章: