Typecho 链接去 index.php

136 字
1 分钟
Typecho 链接去 index.php
2025-05-29
浏览量 加载中...

Typecho 链接去 index.php#

刚用 Typecho 的用户肯定遇到过在打开页面地址结果在主域名后多了个 index.php 的问题吧,那么下面就来教你怎么解决这个问题吧。

Typecho 后台开启伪静态#

设置 → 永久链接设置,选择启用地址重写功能,并选择你喜好的文章路径 (url 形式) 。

配置服务器的 rewrite 规则#

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>

Nginx:

server {
...
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
...
}

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

Typecho 链接去 index.php
https://www.satxm.top/posts/typecho-index/
作者
Satxm
发布于
2025-05-29
许可协议
CC BY-NC-SA 4.0
最后更新于 2025-05-29,距今已过 282 天

部分内容可能已过时

评论区

Profile Image of the Author
Satxm
Satxm's Book
公告
欢迎来到我的博客!这是一则示例公告。
音乐
封面

音乐

暂未播放

0:00 0:00
暂无歌词
分类
标签
站点统计
文章
48
分类
11
标签
44
总字数
24,574
运行时长
0
最后活动
0 天前

目录