dkraut_23236
Sep 02, 2008Nimbostratus
newbie needs irule help....
ok, I'm completely new to irules so break out the coloring book and crayons for me! lol.
I'm trying to create a rule that takes the incoming URI from the client and appends a number to the end of the host and then forwards to the corresponding pool member. For example, John Doe sends a request to http://bmcmtr:5282
and then the F5 adds a 01 to this request and forwards to pool member 01 as > http://bmcmtr01
The next request does the same thing except it is forwarded to 02 and the next to 03 and the next to 04.
The irule below generates "wrong args" errors when I attempt to create it. Am I completely off base here? Thanks!
when HTTP_REQUEST {
if { ([HTTP::host] eq "BMCMTR:5282") } {
HTTP::host "BMCMTR01:5282"
pool HTTP_pool member 10.1.1.14 80
}
if { ([HTTP::host] eq "BMCMTR:5382") } {
HTTP::host "BMCMTR02:5282"
pool HTTP_pool member 10.1.1.15 80
}
if { ([HTTP::host] eq "BMCMTR:5382") } {
HTTP::host "BMCMTR03:5282"
pool HTTP_pool member 10.1.1.16 80
}
if { ([HTTP::host] eq "BMCMTR:5382") } {
HTTP::host "BMCMTR04:5282"
pool HTTP_pool member 10.1.1.17 80
}
}
}