在Typecho安装根目录下创建如下内容的 .htaccess 文件,然后上传到Typecho安装目录。
Typecho安装在网站根目录
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
Typecho安装在网站二级目录
下面的代码以安装在blog二级目录为例:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blog/index.php/$1 [L]
</IfModule>
然后在Typecho后台强制设置永久链接即可。