1.删除 application 目录下的 .htaccess 文件
2.找到 public 目录下的 .htaccess 文件 在文件中写入(前提是要配置好虚拟域名)
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>