Forum Discussion
Ram_T_S
Altostratus
Jul 12, 2018Irule Query
1)Can we point multiple requests to multiple VIP by doing a redirection? Eg: http://home.xyz.com should still point to SharePoint 2010 server and when user hits
•[http://home.xyz.com/Site1(shou...
Andy_McGrath
Cumulonimbus
Jul 13, 2018Using a switch statement in your HTTP_REQUEST event iRule would be best, something like this:
switch -glob [string tolower [HTTP::uri]] {
"/site1*" {
this will match on any string that starts with "/site1
HTTP::redirect https:://new.home.xyz.com[HTTP::uri]
}
"/sitea*" {
this will match on any string that starts with "/site1
HTTP::redirect https:://new.home.xyz.com/Site1/[HTTP::uri]
}
}
For help on using switch statements in iRules see this helpful article iRule 101 Switch
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