Hello,
I’m trying to create an iRule to shape traffic to different servers in the web farm. For an example:
if “www.abc.com/1”
then goes to first pool member. “www.abc.com/2”
then goes to second pool member.
The second scenario I need is:
if “www.abc.com” then rewrites to “www.abc.com/test” ---> server pool A if “www.abc.com/test1” then ---> server pool B if “www.abc.com/test2” then ---> server pool C
Thanks!
when HTTP_REQUEST {
switch [HTTP::uri] {
"/test1" { pool A }
"/test2" { pool B }
"/test3" { pool C }
}
}
nitass
3
if “www.abc.com/1” then goes to first pool member.
“www.abc.com/2” then goes to second pool member.
you can use HTTP::uri command to check uri (e.g. /1, /2) and then send traffic to specific pool member using node or pool (pool … member …) command.
HTTP::uri
node
pool
if “www.abc.com” then rewrites to “www.abc.com/test” ---> server pool A
if “www.abc.com/test1” then ---> server pool B
if “www.abc.com/test2” then ---> server pool C
HTTP::uri command is also used to rewrite uri (e.g. / to /test).
Thanks everyone. THis has been very helpful and the resolution is complete.