public文件下创建htaccess
.htaccess文件写入下面规则
<IfModule mod_rewrite.c> RewriteEngine on RewriteBase /RewriteCond %{REQUEST_URI} !^/public/RewriteRule ^(.*)$ public/$1?Rewrite [L,QSA]</IfModule>