Forum Discussion
Bertolazzi_7869
Apr 18, 2012Nimbostratus
Hi,
I searched here in the forum and found a thread on redirection to pool, so I created two iRules.
1º - iRule - pool redirection
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/abc*" {pool pool_def}
"/hij*" {pool pool_klm}
}
}
2º iRule - http redirection
when HTTP_REQUEST {
if { [HTTP::uri] equals "/abc" } {
HTTP::redirect "http://[HTTP::host]/def/"
}
if { [HTTP::uri] equals "/hij" } {
HTTP::redirect "http://[HTTP::host]/klm/"
}
}
I was successful in the tests that I performed, but i don't know if this way is the best.
I will continue performing the tests and keep everyone updated.
Tks.