F51982_110427
Jan 06, 2017Nimbostratus
Irule - Load Balance
Question on redirects and load balancing the redirect based on IP Address.
Is this possible? is my first question.
Here is an Example -
Existing site is
msoft.com/login/grumpy
New Site is going to be redirected and users would go to
microsoft.com/happydays
Is it possible to issue a redirect of the existing site and load balance it to it's new servers under microsoft.com/happydays
I have attempted to issue a redirect and load balance via an if/elseif statement however the data does not appear to go beyond the Http::respond -
ltm data-group datagroupvariable {
records {
/happydays {
data /login/grumpy
}
}
set variablewebsite [string tolower [HTTP::uri]]
if { ([class match $variablewebsite equals /datagroupvariable]) } {
HTTP::respond 301 location "https://[HTTP::host][class lookup $variablewebsite /datagroupvariable]"
} elseif { [class match [IP::client_addr] equals 192.168.1.0/24] } {
pool NewServerPool
} else {
reject
}
}
I can get a respond page, but while including the class match of client IP, I do not get a load balanced page. I get nothing instead.
Any Ideas?