Forum Discussion
Bertolazzi_7869
Nimbostratus
Apr 18, 2012HTTP Redirect: Hint or an example?
Hi everyone
!
Sorry for
my bad
English.
See if you
can help me, I'm a newbie in F5 and iRules and I search the following:
Redirect
requests ...
Bertolazzi_7869
Nimbostratus
Apr 18, 2012Hi,
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects