这篇文章主要介绍了在phpstudy集成环境下的nginx服务器下配置url重写的教程,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下。
直接在对应的vhosts.conf配置文件的location / {}中添加以下内容:
location / {
index index.html index.htm index.php;
#autoindex on;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
具体操作过程如下:
1、找到对应的vhosts.conf配置文件
phpstudy nginx url重写
2、选择所需要配置重写url的站点。
大型站长资讯类网站! https://www.nzzz.com.cn