Forum Discussion
SK74_347537
Nimbostratus
Mar 15, 2018Replacing 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...
Stanislas_Piro2
Cumulonimbus
Mar 15, 2018you can use multiple value pair in string map command:
when HTTP_RESPONSE {
if { [HTTP::header exists Location] } {
HTTP::header replace [string map -nocase {"http://www.example.com" "https://www.example.com" "http://www2.example.com" "https://www2.example.com" "http://www3.example.com" "https://www3.example.com" "http://www4.example.com" "https://www4.example.com"} [HTTP::header Location]]
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
