This commit is contained in:
Your Name
2026-07-22 10:18:59 +08:00
parent 2530ddada6
commit 0fb03d0bca
618 changed files with 19445 additions and 3 deletions
+23
View File
@@ -0,0 +1,23 @@
# phpstudy / Nginx 伪静态规则(勿用 ThinkPHP 默认「全站转发 index.php」)
# 在 phpstudy → 网站 → 伪静态 中粘贴以下内容:
location ^~ /api {
rewrite ^ /index.php?s=$uri last;
}
# 上传文件直读(可选优化,仍走 PHP 也 OK)
location ^~ /api/uploads/ {
rewrite ^ /index.php?s=$uri last;
}
location ^~ /admin/ {
try_files $uri $uri/ /admin/index.html;
}
location = /admin {
return 301 /admin/;
}
location / {
try_files $uri $uri/ /index.html;
}