nginx目录下的nginx.config的location节点添加如下配置
yii2伪静态配置
location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?r=/$1 last;
break; }
}
thinkPhP伪静态配置
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}