码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 开启rewrite thinkcmf

时间:2018-11-14 21:03:36      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:think   开启   ...   pre   php   文件   write   dex   $1   

server{
... 省略

location / {
        index  index.php index.html index.htm;
         #如果请求既不是一个文件,也不是一个目录,则执行一下重写规则
         if (!-e $request_filename)
         {
            #地址作为将参数rewrite到index.php上。
            rewrite ^/(.*)$ /index.php?s=$1;
            #若是子目录则使用下面这句,将subdir改成目录名称即可。
            #rewrite ^/subdir/(.*)$ /subdir/index.php?s=$1;
         }
    }
    
 ... 省略

}

nginx 开启rewrite thinkcmf

标签:think   开启   ...   pre   php   文件   write   dex   $1   

原文地址:https://www.cnblogs.com/jiqing9006/p/9959854.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!