Forum Discussion
sandy16
Altostratus
Oct 06, 2014irule for URI based redirection to separate Pools
Hi, I am new to irules. Need help in writing an irule that does a simple URI re-direction to seperate Pools with NO default Pool on the VS and the F5 returns a default-http page guiding to the user t...
cjunior
Nacreous
Oct 06, 2014Maybe you can do like that:
when HTTP_REQUEST {
set path [string tolower [lindex [split [HTTP::path] "/"] 1]]
switch -glob $path {
"dev" { pool pool-dev }
"ct" { pool pool-ct }
"uat" { pool pool-uat }
default {
HTTP::respond 200 content "Content-Type "text/html" Connection Close"
}
}
}
You can get an iFile or base64 variable content to present the html too. Find some examples in this channel.
Regards.
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