我有一个域名:http://test.abc.com,如果访问这个域名的targetUrl目录(http://test.abc.com/targetUrl/http://xyz.com),就路由到http://test.xyz.com/
nginx的配置如下:
location ~ ^/targetUrl/(.*)$ {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass $1;
}
另外:http://test.abc.com/targetUrl/http://xyz.com 这是post请求
但是一直无法生效,麻烦各路神仙帮忙看下