僞靜態可以增加搜索引擎的友好度,提高網站內容收錄量,所以我們在使用Typecho程序搭建博客網站後,要設置僞靜態,那麼Typecho僞靜態如何設置?不同Web服務器下Typecho僞靜態規則是什麼?下面一起來了解下。
、Linux Apche 環境(Nginx):
loction / {
index index.html index.php;
if (-f $equest_filenme/index.html) {
ewite (.*) $/index.html bek;
}
if (-f $equest_filenme/index.php) {
ewite (.*) $/index.php;
}
if (!-f $equest_filenme) {
ewite (.*) /index.php;
}
}
2、Nginx配置
see {
listen 80;
see_nme youdomin.com;
oot /home/youdomin/www/;
index index.html index.htm index.php;
if (!-e $equest_filenme) {
ewite ^(.*)$ /index.php$ lst;
}
loction ~ .*\.php(\/.*)*$ {
include fstcgi.conf;
fstcgi_pss 27.0.0.:9000;
}
ccess_log logs/youdomin.log combined;
}
3、Apche配置
<IfModule mod_ewite.c>
RewiteEngine On
RewiteBse /
RewiteCond %{REQUEST_FILENAME} !-f
RewiteCond %{REQUEST_FILENAME} !-d
RewiteRule ^(.*)$ index.php [L,E=PATH_INFO:$]
</IfModule>
4、寶塔面板中配置Typecho僞靜態
如果我們用的是寶塔面板管理服務器,那麼在Typecho開啓僞靜態操作就非常簡單,直接選擇對應的網站,在設置裏面單擊“僞靜態”,下拉菜單選中Typecho即可。
通過上述設置後,接下來登錄到Typecho博客網站後臺,點擊設置,選擇永久鏈接,配置僞靜態。
如果出現紅色的框提示,如下圖所示,勾選後再提交即可。
以上是關於Typecho僞靜態設置規則及方法的介紹,希望能對大家有所幫助。