XY BLOG

XY的BLOG

chevereto nginx 伪静态

Published on in Posts
Updated on
Short link: https://b.xyzt07.cn/s/1c
Share this post
A ⇄ 文
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.
location / {
    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;
    }
    try_files $uri $uri/ /api.php;
}
location /admin {
    try_files $uri /admin/index.php?$args;
}