Forum Discussion
sandy16
Altostratus
Nov 07, 2012irule for F5 to return a message/string
Folks,
i need to do load-balancing based on the "uri" in the url. I have this working BUT need the F5 to return a http code/message like"Use /dev or /qa to go to your environments" if no uri is ...
sandy16
Altostratus
Nov 09, 2012Lastly, This is how my irule looks like - BUT the VIP is showing down as I do not have a default pool configured on it. Also the vip is displaying a blank webpage when opened instead of sending the http response 200.
when HTTP_REQUEST {
if {[HTTP::uri] contains "/dev"} {
pool dev-pool
if {[HTTP::uri] contains "/qa"} {
pool qa-pool
if {[HTTP::uri] contains "/uat"} {
pool uat-pool
}
}
}
else {
HTTP::respond 200 contains "Please use /dev to go to the dev-webserivces-proxies, /qa to go to the qa-webserivces-proxies, /uat to go to the uat-webserivces-proxies"
}
}
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
