Forum Discussion
Snl
Cirrostratus
Jun 27, 2016Irule help need to remove the port before sending uri to server
Folks Need help here
i am trying to remove port information before sending the uri with match keyword to server which listen on only port 80
example VIP 1.1.1.1:9443 NODE- 10.10.10.10:80
Client...
Yann_Desmarest
Cirrus
Jun 27, 2016Hi,
You have a command easier than :
HTTP::header replace Host "[string map {":9443" ""} [HTTP::header Host]]
You can use the command below instead :
HTTP::header replace Host [getfield [HTTP::header Host] ":" 1]
Below the whole code sample with some proposals :
when HTTP_REQUEST {
if { ([HTTP::uri] contains "loadWsSingleProvider") } {
if { !([active_members POOL123]) } {
HTTP::respond 302 Location "https://abc.xyz.com"
log local0. "POOL123 is down"
} else {
HTTP::header replace Host [getfield [HTTP::header Host] ":" 1]
pool POOL123
}
}
}
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