Forum Discussion
CraigM_17826
Altocumulus
Feb 03, 2010Odd issue with pools and a redirect
Hi all,
Sorry if this is a bit of a rambling post, but it's quite an odd issue I am seeing and I wanted to explain what we are doing and why. Hopefully it's not too confusing.
...
hoolio
Cirrostratus
Feb 03, 2010Also note that if you want LTM to rewrite the server redirects from http://backendserver1.com.au:82/site1 to /site1 (ie, make the redirect a local reference without the protocol, host or port), you could check for a redirect using HTTP::is_redirect and check the Location header value for backendserver1 or some other incorrect value:
when HTTP_RESPONSE {
Check if response is a redirect
if {[HTTP::is_redirect]}{
Check if Location header has :82/ in it
if {[HTTP::header Location] contains ":[TCP::server_port]/"}{
Rewrite the location header. Use getfield to split the header value on the string ":82/"
where 82 is the server port. Prepend a forward slash as it will be removed by getfield
HTTP::header replace Location "/[getfield [HTTP::header Location] ":[TCP::server_port]/" 2]"
}
}
}
The browser will use the original protocol and host to generate the next request to the local Location URI.
Aaron
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