首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >请教大佬,linuxs上wordpress 设置nginx伪静态不生效问题?

请教大佬,linuxs上wordpress 设置nginx伪静态不生效问题?

提问于 2022-01-07 10:12:55
回答 1关注 0查看 336

想请问下有经验的大佬,本人是初学者,在搭建个人博客wordpress时,想使用固定链接,但修改后打开文章就报404错误,只有默认朴素没问题,经过查询得知需要设置伪静态,找到网上的很多解决方法,折腾了一天多还是无效,想请问下,是哪里不对么?下面是我的nginx配置文件截图,

尝试过网上一些转发代码: 1.location / {

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;

}

}

rewrite /wp-admin$ $scheme://$host$uri/ permanent;

2.

if (!-e $request_filename) {

rewrite (.*) /wordpress/index.php;

}

等等都无效

nginx配置.conf文件

相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档