查看: 59|回覆: 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.

在本版发帖返回顶部