(已解决)nginx+tp,怎么设置 省略index.php的url访问。

打开vhosts.conf,在localhost / {}里面加入下面的代码:

if (!-e $request_filename)
{
     rewrite ^(.*)$ /index.php?s=$1 last;
}

然后重启nginx。

原文地址:https://www.cnblogs.com/the-one/p/11815949.html