phpstudy设置wordpress的

phpstudy本地搭建环境的时候,我们用wordpress,因为要改url命名的后缀。我们需要开启wp的伪静态。

如果你是使用phpstudy的话,则可参考以下方法

1.打开设置——配置文件——vhosts.conf——0localhost——80

phpstudy设置wordpress的

2.加入代码

phpstudy设置wordpress的

记得在最后一个括号前加入代码。

if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}

3.重启环境,就成功了!

phpstudy设置wordpress的

公众号:懒汉运营,关注获取免费资源。如若转载本文章,请注明出处:https://98seo.com/wangzhan/777.html

(0)
上一篇 2022年1月13日 下午3:47
下一篇 2022年1月27日 下午4:07

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

微信
微信关注公众号:「懒汉运营」 ,免费获取干货资料和软件!