面板:从宝塔更换为CyberPanel

直接参考 Installing CyberPanel

Typecho 开启伪静态

yourdomainname.com/admin/options-permalink.php中,开启地址重写功能,你也可以选择一种自己喜欢的文章路径风格。

https://cdn.jsdelivr.net/gh/SuperLangdon/image-hosting/202212302004777.webp#vwid=1474&vhei=622
https://cdn.jsdelivr.net/gh/SuperLangdon/image-hosting/202212302004777.webp#vwid=1474&vhei=622

如果在保存上述配置的时候,Typecho 无法自动配置,那么你可能需要手动配置服务器的 rewrite 规则。

以下提供两种rewrite规则的配置。本站使用OneLiteSpeed,因此使用的是Apache环境下的配置,工作良好。

nginx 配置.conf

if (-f $request_filename/index.html){
    rewrite (.*) $1/index.html break;
    }
if (-f $request_filename/index.php){
    rewrite (.*) $1/index.php;
    }
if (!-e $request_filename){
    rewrite (.*) /index.php;
    }

Apache环境 .htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

</IfModule>

解决Typecho控制台插件存在残留菜单项的问题

去网站数据库中找 typecho_options中的panelTable一值,将不需要的菜单项删除即可。

我的Typecho优化笔记

https://blog.langdon.one/archives/my-typecho-optimization-notes.html

作者

澜璒

发布时间

2022-09-08