Forum Discussion
David_Noonan_67
Sep 20, 2011Nimbostratus
The iRule below is also applied to that VS but I don't think the two conflict (unless it's bad to have multiple HTTP_REQUEST events being called.
when HTTP_REQUEST {
set fqdn_name [HTTP::host]
}
when HTTP_RESPONSE {
if { [HTTP::is_redirect] }{
if { [HTTP::header Location] starts_with "/" }{
HTTP::header replace Location "https://$fqdn_name[HTTP::header Location]"
} else {
HTTP::header replace Location "[string map {'http://' 'https://'} [HTTP::header Location]]"
}
}
}