nginx配置URL截取配置
时间:2018-09-30 12:39:14
收藏:0
阅读:759
需求是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;
原文:http://blog.51cto.com/gavin0/2287793
评论(0)