Forum Discussion
GwIDsON
Nimbostratus
Dec 21, 2020F5 LTM - iRule that will replace the host, remove the path and send traffic to the specific pool
Hi, I have a standard VIP on port 443 with SSL client and servers side profile and some pool on port 443 as well. What I need to implement on that VIP is: when the path begins with /VPC (...
Mayur_Sutare
MVP
Dec 21, 2020Hi,
You can have below iRules on your VS to achieve your requirement.
iRule 1 -
when HTTP_REQUEST {
if { ([HTTP::host] equals "example.com") && ([HTTP::uri] starts_with "/vpc") } {
HTTP::respond 301 Location "https://example2.net"
}
}iRule 2 - For Pool selection
when HTTP_REQUEST
{
switch [HTTP::host] {
"example2.net" {pool example2_pool}
}
}You can bind these iRules to your virtual server so it will match for desired requests, rest requests will be forwarded to the default pool.
Hope it helps!
Mayur
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