Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?$1 [QSA,PT,L]
</IfModule>
在项目public文件夹下新建.htaccess
粘贴上面的代码
这里要注意
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
这行的index.php/有时候很多服务器会解析不了
要改成index.php?


