在phpstudy的nginx服务器下配置url重写

≡放荡痞女 提交于 2019-12-06 07:20:14

在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配置文件

2、选择所需要配置重写url的站点

搞定!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!