Silicon_84874
Jul 13, 2010Nimbostratus
Redirection to the same pool
Hi,
I'm new to iRules and do not have any formal training and I'm looking for some assistance please.
This is what I'm trying to achieve;
I have 1 pool consisting of two servers.
The two servers/pool hosts 3 websites. For simplicity, lets call it a, b and c.
pool_1/a
pool_1/b
pool_1/c
What I'm hoping to achieve is this;
http://a.domain.com/ gets redirected to pool_1/a
http://b.domain.com/ gets redirected to pool_1/b
http://c.domain.com/ gets redirected to pool_1/c
So far this is what I managed to come up with. It's incomplete and possible not going to work, but if someone could please finish off where I started or suggest otherwise.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "a" } {
pool pool_1
} elseif { [HTTP::uri] starts_with "b" } {
pool pool_1
} elseif { [HTTP::uri] starts_with "c" } {
pool pool_1
}
}
Thanks in advance!