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

在phpstudy集成环境下的nginx服务器下配置url重写

直接在对应的vhosts.conf配置文件的location / {}中添加如下内容:php

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

具体操做过程以下:html

一、找到对应的vhosts.conf配置文件

二、选择所须要配置重写url的站点

搞定!

相关文章
相关标签/搜索