惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AI
AI
TaoSecurity Blog
TaoSecurity Blog
H
Heimdal Security Blog
Help Net Security
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
爱范儿
爱范儿
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
N
News | PayPal Newsroom
V2EX - 技术
V2EX - 技术
博客园 - 【当耐特】
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
Secure Thoughts
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
有赞技术团队
有赞技术团队
S
Schneier on Security
S
SegmentFault 最新的问题
Google Online Security Blog
Google Online Security Blog
H
Hacker News: Front Page
The Last Watchdog
The Last Watchdog
Schneier on Security
Schneier on Security
PCI Perspectives
PCI Perspectives
IT之家
IT之家
Project Zero
Project Zero
博客园 - 司徒正美
P
Privacy International News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Jina AI
Jina AI
Security Latest
Security Latest
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
V
Vulnerabilities – Threatpost
W
WeLiveSecurity
NISL@THU
NISL@THU
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
L
Lohrmann on Cybersecurity

wordpress – 百品博客

暂无文章

WordPress开启伪静态教程 - 百品博客
MX文章作者勇敢打破裂缝,阳光就会洒满其中。 · 2026-06-01 · via wordpress – 百品博客

今天刚好有人在Q群里问这个问题,顺便记录一下

后台需要做的

前往设置——固定链接中,选择一个伪静态样式(朴素型不是伪静态)

https://www.baipin.pw/wp-content/uploads/2021/05/Screenshot_20210505_173626-1024x579.jpg

服务器端需要做的

Apache

若为Apache,将以下代码保存为txt文件,再上传到根目录改名为“.htaccess”(注意点)即可。

RewriteRule /tag/(.) /index.php\?tag=$1 RewriteRule /software-files/(.) /software-files/$1 [L]
 RewriteRule /images/(.*) /images/$1 [L]
 RewriteRule /sitemap.xml /sitemap.xml [L]
 RewriteRule /favicon.ico /favicon.ico [L]
 For file-based wordpress content (i.e. theme), admin, etc.
 RewriteRule /wp-(.*) /wp-$1 [L]
 For normal wordpress content, via index.php
 RewriteRule ^/$ /index.php [L]
 RewriteRule /(.*) /index.php/$1 [L]

Nginx

若为Nginx,在nginx.conf内,找到

server { }

在{}内添加以下代码:

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;
}}

保存,重启即可