将typecho博客的index.php 隐藏起来,让链接简洁好看
- 2020 年 3 月 12 日
- 筆記
一、引言
使用过typecho博客都知道,博客链接中会默认出现index.php/, 为了简洁好看,让我们动手隐藏它吧
二、操作
后台设置

宝塔设置
如果不进行这一步操作,你会发现你点击自己的博文会出现404
放入代码:
if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; }

重新刷新页面就完成了
使用过typecho博客都知道,博客链接中会默认出现index.php/, 为了简洁好看,让我们动手隐藏它吧
如果不进行这一步操作,你会发现你点击自己的博文会出现404
if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; }
重新刷新页面就完成了