Typecho开启伪静态,去掉index.php教程

淡泊云
1天前发布 /正在检测是否收录...
AD AD

Typecho博客初始安装完成后,博客的任何内页面或地址栏都会有 index.php ,都会在域名后加上index.php,很多人都接受不了。$[阿鲁表情]::(无所谓)

例如,我的博客网址: http://blog.danb.cc/index.php/archives/3.html

但是,我希望最终的形式是这样: http:///blog.danb.cc/archives/3.html

那么,我们如何做到这样的效果? $[阿鲁表情]::(邪恶)

配置服务器的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>
喜欢就支持一下吧
点赞 0 分享 赞赏
评论 抢沙发
OωO
取消
SSL