宝塔面板 -Nginx-thinkphp配置

在这里插入图片描述

对应站点设置中,可修改访问网站的目录,修改nginx对应站点配置文件

在这里插入图片描述

新增下面代码,即可完成重写路由,增加index.php

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

猜你喜欢

转载自blog.csdn.net/qq_39027055/article/details/85071860