what the irule does is if host and port in url is uatebsapp1.abc.com:8060, send redirection to same uri but server1.abc.com:8060.
if host and port in url is not uatebsapp1.abc.com:8060, send request to pool member but change host and port to uatebsapp1.abc.com:8060.
you have to also map server1.abc.com to virtual server ip which is listening on port 8060.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:8060
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 49
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
if { [HTTP::host] eq "uatebsapp1.abc.com:8060" } {
HTTP::redirect "http://server1.abc.com:8060[HTTP::uri]"
}
}
when HTTP_REQUEST_SEND {
clientside {
HTTP::header replace Host "uatebsapp1.abc.com:8060"
}
}
}
trace
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 8060 or port 80
New TCP connection 1: 172.28.24.1(51845) <-> 172.28.24.10(8060)
1404642113.4968 (0.0055) C>S
---------------------------------------------------------------
GET /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: uatebsapp1.abc.com:8060
---------------------------------------------------------------
1404642113.4969 (0.0000) S>C
---------------------------------------------------------------
HTTP/1.0 302 Found
Location: http://server1.abc.com:8060/something
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
---------------------------------------------------------------
New TCP connection 2: 172.28.24.1(51846) <-> 172.28.24.10(8060)
1404642113.5074 (0.0027) C>S
---------------------------------------------------------------
GET /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
Host: server1.abc.com:8060
Accept: */*
---------------------------------------------------------------
New TCP connection 3: 200.200.200.14(51846) <-> 200.200.200.101(80)
1404642113.5238 (0.0162) C>S
---------------------------------------------------------------
GET /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
Host: uatebsapp1.abc.com:8060
Accept: */*
---------------------------------------------------------------