首页 > 其他 > 详细

nginx 开启rewrite thinkcmf

时间:2018-11-14 20:28:30      阅读:232      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!