nginx配置URL截取配置

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

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

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

相關文章
相關標籤/搜索