更新
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user