您的位置 首页 php

thinkcmf6如何在phpstudy中配置伪静态

thinkcmf6如何在phpstudy中配置伪静态

1.根据thinkcmf6的 nginx 部署。

要添加的伪静态代码如下。要把其中的中文去掉然后粘贴到 phpstudy 中哦

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

图中是thinkcmf6的nginx配置伪静态的文档

2.phpstudy中设置伪静态,如下:

把如下的伪静态代码复制到study的网站–修改–伪静态中即可。

if (!-e $request_filename)

{

rewrite ^/(.*)$ /index.php?s=$1;

}

从图中可以看到对中文支持不好。还有phpstudy的网站根目录不能是中文哦。

还有目前就是修改nginx的配置文件会导致网站-修改中提示,站点已经被手动修改,继续操作会覆盖源文件,这个问题还没有解决,留待以后处理。

文章来源:智云一二三科技

文章标题:thinkcmf6如何在phpstudy中配置伪静态

文章地址:https://www.zhihuclub.com/80184.shtml

关于作者: 智云科技

热门文章

网站地图