请问个问题,nginx怎么配置一个访问地址加参数,转发到两套环境?

只有一个域名,现在要新老版本一起去,部署了两套集群环境?????

www.baidu.com/url/
www.baidu.com/oldurl/
根据后面的 url做分发

我的nginx.conf

    location ~ ^/(c)/{ 
        root html; 
        index  index.html index.htm index.php; 
    } 


    location / { 
        proxy_pass http://127.0.0.1:8080; 
        index /; 
    } 



    location ~ ^/(forum)/ { 
        proxy_pass http://127.0.0.1:9080; 
        index /forums/list.html; 
    } 

    location ~ ^/(v1)/ { 
        proxy_pass http://127.0.0.1:10080; 
        index /error.jsp; 
    } 

    location /nginx_status { 
        stub_status on; 
        access_log off; 
        allow 223.4.92.50; 
        deny all; 

配置虚拟主机,old.yuming.com new.yuming.com 两个二级域名指向不同版本

宝塔一键配置啊。。。。。

不同的url用location区分匹配;
相同url的不通参数,在lcoation模块里面用if判断转发到不通后端。

相同url添加的不通参数,然后用if判断转发到不通位置

图片说明