Forum Discussion
piotrgrota_2748
Nimbostratus
Mar 20, 2017BIG-IP randomly closing connection from .NET Application
We have BIG-IP F5 Load Balancer please see below version
ProductCode : BIG-IP
ProductVersion : 11.5.4
PackageVersion : Build 1.0.286 - Fri Mar 18 14:22:54 PDT 2016
PackageEdition : Hotfix H...
That should work okay. You could replace [HTTP::status] starts_with "3" with HTTP::is_redirect. Also, the Host header does not exist in responses, so you don't need to try to replace/insert it.
when HTTP_REQUEST {
Replace the existing host header value with www.test.com
HTTP::header replace "Host" "www.test.com"
}
when HTTP_RESPONSE {
Check if response is a redirect
if { [HTTP::is_redirect]} {
Check if response contains the old domain name
if { [HTTP::header location] contains "http://www.redirect.com/" } {
Replace the old domain name with the new one in the Location header
HTTP::header replace location [string map {www.redirect.com www.test2.com} [HTTP::header location]]
}
}
}
Aaron
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