Forum Discussion
Amol_Khatavkar_
Nimbostratus
Dec 16, 2014how to create the iRule for redirecting traffic on URL context string?
2.1) I would like all web traffics that begin with the following URL context string https://192.168.10.1/YYYY* or https://10.10.10.1/YYYY* to be
directed to the default YYYY.YYYYY.com-https loa...
Michael_Jenkins
Cirrostratus
Dec 18, 2014You can do this with code like the following. As long as people are accessing the URL by ip address like in your example, it should work. Otherwise, You'll need to add some additional conditions in the switch statement to handle the alternate hosts.
when HTTP_REQUEST {
switch -glob -- [string tolower "[HTTP::host][HTTP::uri]"] {
"192.168.10.1/YYYY*" -
"10.10.10.1/YYYY*" {
pool YYYY.YYYYY.com-https
}
"192.168.10.1/WWWW-*" -
"10.10.10.1/WWWW-*" -
"192.168.10.1/VVVV-*" -
"10.10.10.1/VVVV-*" {
pool YYYY.WW.YYYYY.com-https
}
}
}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