|
|
@@ -63,7 +63,9 @@ location /vasen-website/ {
|
|
|
|
|
|
# ---- Ajax 接口 mock(由 vasen-sync stage04 生成)----
|
|
|
# HTML 片段接口:/ajax/xxx/N -> web/api/xxx/N.html
|
|
|
- location ~ ^/vasen-website/ajax/([a-z0-9_]+)/?([0-9a-z]+)?$ {
|
|
|
+ # 匹配任意层级路径下的 /ajax/(页面可能在 product/product_info/ 等子目录)
|
|
|
+ # 参数段支持 数字/数字 形式(如 product_more/68/1),取第一段作为文件名
|
|
|
+ location ~ ^/vasen-website/.*/ajax/([a-z0-9_]+)/([0-9]+)(?:/[0-9]+)?$ {
|
|
|
default_type text/html;
|
|
|
charset utf-8;
|
|
|
add_header Cache-Control "no-cache";
|
|
|
@@ -71,6 +73,31 @@ location /vasen-website/ {
|
|
|
try_files /$1/$2.html /$1/default.html =204;
|
|
|
access_log off;
|
|
|
}
|
|
|
+ location ~ ^/vasen-website/.*/ajax/([a-z0-9_]+)/?$ {
|
|
|
+ default_type text/html;
|
|
|
+ charset utf-8;
|
|
|
+ add_header Cache-Control "no-cache";
|
|
|
+ root /lio/projects/vasen-website/web/api;
|
|
|
+ try_files /$1/default.html =204;
|
|
|
+ access_log off;
|
|
|
+ }
|
|
|
+ # 兼容根路径 /ajax/xxx/N
|
|
|
+ location ~ ^/vasen-website/ajax/([a-z0-9_]+)/([0-9]+)(?:/[0-9]+)?$ {
|
|
|
+ default_type text/html;
|
|
|
+ charset utf-8;
|
|
|
+ add_header Cache-Control "no-cache";
|
|
|
+ root /lio/projects/vasen-website/web/api;
|
|
|
+ try_files /$1/$2.html /$1/default.html =204;
|
|
|
+ access_log off;
|
|
|
+ }
|
|
|
+ location ~ ^/vasen-website/ajax/([a-z0-9_]+)/?$ {
|
|
|
+ default_type text/html;
|
|
|
+ charset utf-8;
|
|
|
+ add_header Cache-Control "no-cache";
|
|
|
+ root /lio/projects/vasen-website/web/api;
|
|
|
+ try_files /$1/default.html =204;
|
|
|
+ access_log off;
|
|
|
+ }
|
|
|
|
|
|
# /web/index.php/butler/download(高频,626处引用)-> 直接服务本地下载页
|
|
|
location = /vasen-website/web/index.php/butler/download {
|