Typecho 伪静态

Typecho 支持开启伪静态的,开启之后网址链接更加美观。今天配置了一下,打开了这个功能,此处做记录。

相关的nginx配置如下:

location ~ ^[^.]+\.php(/|$) {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

# 用于伪静态
if (-f $request_filename/index.html) {
    rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php) {
    rewrite (.*) $1/index.php;
}
if (!-f $request_filename) {
    rewrite (.*) /index.php;
}

Nginx修改好之后reload新的配置文件,再进入Typecho就可以直接在配置中开启伪静态选项了。

标签: Nginx, Typecho, 伪静态

添加新评论

已有 4 条评论

  1. DariusRuisk DariusRuisk

    Hey a adequateclose
    Upstanding click

    https://drive.google.com/file/d/1NcIySPFWQHkh3T8OarA8chIGGKZfneji/preview

  2. sbhelusy sbhelusy

    prescription viagra viagra generic generic viagra online viagra generic

  3. sbhelusy sbhelusy

    buy viagra buy generic viagra discount viagra viagra online

  4. ikjScuts ikjScuts

    get viagra online viagra purchase viagra viagra online