Typecho开启伪静态并隐藏index.php

Typecho永久链接会在域名后显示index.php
如 :
[scode type=”lblue”]https://xsiy.top/blog/index.php/about.html[/scode]
怎样解决呢!
首先在typecho程序根目录添加.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>
Author

Linus Xiong

Posted on

2018-04-05

Updated on

2019-04-04

Licensed under

Comments