thinkphp 在 nginx 中 伪静态的规则写法

2017年6月14日 0 条评论 1.49k 次阅读 0 人点赞

在/usr/local/nginx/conf中加入thinkphp.conf,内容如下:

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

然后在vhost的配置中加入 include thinkphp.conf; 即可

Sevenfal

这个人太懒什么东西都没留下

文章评论(0)