Nginx正则匹配重写地址和调试
假设我们向通过 /js 访问 /gm_assets/gm/js 目录下得.js资源
调试$1是否为理想值,设置成功后,访问查看:http://*/gm_assets/gm/js/chunk-97ea71fe.a1568fbb.js
location ~/gm_assets/gm/js {
rewrite ^/gm_assets/gm/js/(.*).*$ /js/$1;
return 200 '{"status":$1}';
}
Nginx正则匹配重写地址和调试
假设我们向通过 /js 访问 /gm_assets/gm/js 目录下得.js资源
调试$1是否为理想值,设置成功后,访问查看:http://*/gm_assets/gm/js/chunk-97ea71fe.a1568fbb.js
location ~/gm_assets/gm/js {
rewrite ^/gm_assets/gm/js/(.*).*$ /js/$1;
return 200 '{"status":$1}';
}
评论