Forum Discussion
adrian_171483
Cirrus
May 26, 2016Irule to match and redirect on port / URI condition
Heres what we a re trying to do..
Got a number of sites using a single IP address on http, depending on the URL we want to re-direct to another port with a new URL then drop to a specific pool ba...
Yann_Desmarest
Cirrus
May 26, 2016Hi,
I think that the irule below should work for you :
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"site1.somesite.com" {
HTTP::redirect "http://site1.somesite.com:8001/App1[HTTP::uri]"
return
}
"site2.somesite.com" {
HTTP::redirect "http://site2.somesite.com:8002/App2[HTTP::uri]"
return
}
"*:8001" {
pool site1
}
"*:8002" {
pool site2
}
}
}
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