Forum Discussion
BM_27231
Jul 11, 2011Nimbostratus
URL based redirection using irules is not working
Hi,
I have problem in my F5 irules the scenario is as follows, appreciate your help in this issue
Http://Dev.abc.com/TEST is my primar...
Michael_Yates
Jul 11, 2011Nimbostratus
You could do something like what I have below.
When doing it this way the item in the switch statement is absolute, so what I have below "/test/maddy/*" contains the wildcard so that this would equal { [HTTP::uri] starts_with "/test/maddy" }.
This should also make it easier to add to in the future.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" { HTTP::redirect "http://dev.abc.com/test" }
"/test/maddy/*" { pool web_maddy_pool_port_9001 }
default { pool Development_TEST_pool_port_7789 }
}
}
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