Forum Discussion
nitass
Jan 21, 2013Employee
if both sites are managed by bigip, you may use virtual command instead.
e.g.
[root@ve10:Active] config b virtual bar1 list
virtual bar1 {
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/test" } {
HTTP::header replace Host "www.site2.com"
virtual bar2
}
}
}
[root@ve10:Active] config b virtual bar2 list
virtual bar2 {
snat automap
pool foo
destination 1.1.1.1:80
ip protocol 6
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.19.251(47230) <-> 172.28.19.252(80)
1358775742.2911 (0.0010) C>S
---------------------------------------------------------------
GET /test/something HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Accept: */*
Host: www.site1.com
---------------------------------------------------------------
New TCP connection 2: 172.28.19.251(47230) <-> 1.1.1.1(80)
1358775742.2913 (0.0000) C>S
---------------------------------------------------------------
GET /test/something HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Accept: */*
Host: www.site2.com
---------------------------------------------------------------
New TCP connection 3: 200.200.200.253(47230) <-> 200.200.200.101(80)
1358775742.2931 (0.0017) C>S
---------------------------------------------------------------
GET /test/something HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Accept: */*
Host: www.site2.com
---------------------------------------------------------------