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

相关文章
相关标签/搜索