136 字
1 分钟
Typecho 链接去 index.php
Typecho 链接去 index.php
刚用 Typecho 的用户肯定遇到过在打开页面地址结果在主域名后多了个 index.php 的问题吧,那么下面就来教你怎么解决这个问题吧。
Typecho 后台开启伪静态
设置 → 永久链接设置,选择启用地址重写功能,并选择你喜好的文章路径 (url 形式) 。
配置服务器的 rewrite 规则
Apache (.htaccess):
<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]</IfModule>Nginx:
server { ...
if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; }
...} Typecho 链接去 index.php
https://www.satxm.top/posts/typecho-index/ 最后更新于 2025-05-29,距今已过 197 天
部分内容可能已过时