请在服务器伪静态设置中配置以下的代码,完成后重启nginx
location / {
try_files $uri $uri/ /public/index.php?$query_string;
}
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(css|js|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|map)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ public/index.php [QSA,L]
</IfModule>