SK74_347537
Mar 15, 2018Nimbostratus
Replacing the protocol from http to https for certain domain
I am trying to replace the protocol of the Location from http to https for certain domains(url) with iRules but getting error with it.
when HTTP_RESPONSE {
if { ( [HTTP::header exists Location] ) and ( [HTTP::header Location] contains "http://" ) and ( class match [HTTP::header Location] contains ssl-domain-data-group) } {
HTTP::header replace [string map -nocase {"http://" "https://"} [HTTP::header Location]]
}
}
Is the syntax wrong? I am new to iRules, so any help is greatly appreciated.