Forum Discussion
Jeroen_V_95572
Aug 17, 2011Nimbostratus
Outgoing header modification
Hello All,
I have a little problem on a BIG IP ASM v10 system.
I have created the following irule:
when HTTP_REQUEST {
set uri [HTTP::uri]
}
whe...
hooleylist
Aug 17, 2011Cirrostratus
Hi Jeroen,
I'm a bit confused. Does the response you want to rewrite contain a Location header with a value that starts with http://www.backendserver.com? Can you try logging the response headers in the iRule:
when HTTP_REQUEST {
set uri [HTTP::uri]
}
when HTTP_RESPONSE {
log local0. "[IP::client_addr]:[TCP::client_port]: URI: $uri, status: [HTTP::status], Location: [HTTP::header "Location"]"
if { [HTTP::is_redirect] and [HTTP::header "Location"] starts_with "http://www.backendserver.com"} {
set host "https://www.example.be"
HTTP::header replace "Location" $host$uri
log local0. "[IP::client_addr]:[TCP::client_port]: Rewriting Location to $host$uri"
}
}
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