84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
location ~ ^/pages/\d+_index.json{ proxy_pass /pages/index.json; }
I tried it but it didn’t workI’m not familiar with nginx configuration, please ask for advice.
欢迎选择我的课程,让我们一起见证您的进步~~
You can use rewrite to rewrite your request path
location / { rewrite ^/pages/\d+_index\.json /pages/index.json break; proxy_pass http://127.0.0.1:8080; } # 测试下 会返回重写后的 url /pages/index.json location = /pages/index.json { return 200 $request_uri; }
I found two solutionsrewrite:
location ~ ^/pages/{ rewrite ^/pages/(\d+)/\d+_index.json http://$host/pages//index.json break; }
proxy_pass
location ~ ^/pages/(\d+)/\d+_index.json$ { proxy_pass http://$host/pages//index.json; }
You can use rewrite to rewrite your request path
I found two solutions
rewrite:
proxy_pass