typecho更新了永久地址的格式,然后再访问之前的地址就变成404了,我用的宝塔面板宝塔 / 面板用户 「网站 → 伪静态」里把上面 Nginx 或 Apache 那段粘进去保存即可,不用手动 SSH。# 旧数字格式跳转到新别名格式location ~ ^/archives/(\d+)/?$ {# 先尝试内部跳转到新地址(返回 301,SEO 无损失)
return 301 /archives/$request_uri;
# 如果你只想“兼容”而不跳转,把上一行改成:
# rewrite ^/archives/(\d+)/?$ /index.php?$1 last;}Typecho 官方伪静态规则(保持不变)location / {index index.html index.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}}
typecho更新地址链接,404了