Forum Discussion
dennypayne
Jun 22, 2006Employee
Some things that will help terminology wise:
https://ht.domain.com/gw is a URL, not a URI. A URI is everything after the hostname, so here ht.domain.com is returned by [HTTP::host]. [HTTP::uri] only returns /gw. So you'll need to fix your if statements to reflect that.
What you are referring to as client NAT is called a SNAT on BIG-IP. So you'll need to add a snat statement to the rule where you want that to happen.
Finally, BIG-IP will do the port translation to the pool by default so you don't need to manually set the URI to use the ports.
So you should end up with something like this (I have not validated syntax exactly):
when HTTP_REQUEST {
set myURI [string tolower [HTTP::uri]]
set myHOST [string tolower [HTTP::host]]
if { $myHOST == "ht.domain.com" and $myURI contains "gw" } {
snat automap
pool poolA
} elseif { $myHOST == "ht.domain.com" and $myURI contains "sec" } {
snat automap
pool poolA
} elseif ...
(and so on)
}else { pool Default_Pool }
}
Hope that helps,
Denny