Nginx去掉url中index.php后缀 如果你使用 Nginx ,在你的网站配置中加入下述代码将会转发所有的请求到 index.php 前端控制器。 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } }