查看: 45|回复: 0

[教程] 阿里云虚拟主机如何设置wordpress伪静态规则

[复制链接]

3

主题

0

回帖

0

积分

热心网友

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2011-7-10
发表于 2023-5-19 00:00:00 | 显示全部楼层 |阅读模式

现在估计很少人会用到云虚拟机,毕竟各家轻量云也比较香。如果你刚好有一台阿里云的虚拟主机,又恰好在使用 WordPress 网站。那么就有可能碰到设置了WordPress 固定链接后,文章、分类跳转404的问题。

阿里云虚拟主机如何设置wordpress伪静态规则

出现这个问题,不用慌,在阿里云虚拟主机后台中,找到 「高级环境设置」-> 「Nginx设置」,填写下面这段代码即可。

  1. location / { 
  2.                 # This is cool because no php is touched for static content. 
  3.                 # include the "?$args" part so non-default permalinks doesn't break when using query string 
  4.                 try_files $uri $uri/ /index.php?$args; 
  5.         } 
  6. rewrite /wp-admin$ $scheme://$host$uri/ permanent; 

原文地址:https://www.suxing.me/wp-courses/2249.html

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部