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

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

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

然后重启nginx。

posted @ 2019-11-07 21:57  心中的阿哲  阅读(1084)  评论(0编辑  收藏  举报