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 ...
What_Lies_Bene1
Cirrostratus
Nov 09, 2012You're too fast Kevin! Thanks
Here's a slightly more efficient version of your rule;
when HTTP_REQUEST { switch -glob { [string tolower [HTTP::uri]] }{
"/dev*" { pool dev-pool }
"/qa*" { pool qa-pool }
"/uat*" { pool uat-pool }
default { HTTP::respond 200 content "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" noserver Content-Type "text/html" Connection "Close" } } }
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
