1. 程式人生 > >nginx配置URL截取配置

nginx配置URL截取配置

轉發 cati 字符 log gin .html idata dex ESS

需求是http://IP/XXX/dist/index.html的URL中XXX為任意字符都轉發到http://IP/dist/index.html

location ~ ^/(.)/dist/(.*)$ {

rewrite /(.)/dist/(.)$ /dist/$2 break;
proxy_pass http://$switch;
access_log /alidata1/logs/nginx/localhost_dist_access.log ZAWEB;

nginx配置URL截取配置