如果本地用的是apache服务器上传到线上服务器修改nginx.htaccess配置文件即可 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } }