/** * 打开nginx配置文件nginx.conf,添加以下内容 * 注意层级,在 http{ server { location { #这里添加 } } } 添加 */ location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php/$1 last; } }