typecho伪静态

typecho
955 0

typecho

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;
}

typecho2

location /typecho/ {
    if (!-e $request_filename) {
        rewrite ^(.*)$ /typecho/index.php$1 last;
    }
}

二级目录伪静态

location /wp/ {
    if (-f $request_filename/index.html){
        rewrite (.*) $1/index.html break;
    }
    if (-f $request_filename/index.php){
        rewrite (.*) $1/index.php last;
    }
    if (!-f $request_filename){
        rewrite (.*) /wp/index.php last;
    }
}

判断伪静态

F12 输入//

alert(document.lastModified);

多次刷新网页,动态时间即为伪静态

最后更新 2021-12-31
评论 ( 0 )
OωO
隐私评论