Forum Discussion
hooleylist
May 22, 2008Cirrostratus
You should be able to check what the original location header value was in the /var/log/ltm log file. The above rule wouldn't have modified the protocol. If you want to change it from http:// to https://, you can modify the rule:
when HTTP_RESPONSE {
Check if a response is a redirect
if {[HTTP::is_redirect]}{
log local0. "Original Location: [HTTP::header value Location]"
Assume the server will use it's own TCP port in redirects and remove it. Also replace http:// with https://.
HTTP::header replace Location [string map -nocase [list http:// https:// ":[LB::server port]" ""] [HTTP::header value Location]]
log local0. "Updated location (string map): [string map -nocase [list http:// https:// ":[LB::server port]" ""] [HTTP::header value Location]]"
}
}
Aaron