Forum Discussion
PeteWhite
Dec 22, 2016Employee
Add logs so that you can see what is happening.
Am I correct that you want to rewrite redirects to change the location header?
The second iRule is the one that I would use for that - I have created one very close to that recently and it worked fine. Try this:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] && [HTTP::header Location] contains "/cfcc/login/login.jsp" } {
log local0. "Client [IP::client_addr] Rewriting from [HTTP::header Location]"
HTTP::header replace Location [string map -nocase "/cfcc/login/login.jsp /" [HTTP::header Location]]
log local0. "Client [IP::client_addr] Rewritten to [HTTP::header Location]"
}
}