Forum Discussion
Huub_Dewachter1
Nimbostratus
Feb 06, 2014HTTP after redirect, should be HTTPS
Hello all, here an irule newbee.
The problem:
Incoming is a HTTPS-request. I have a certificate installed, and so transfer HTTP to the server(s) behind the LB. They ask again other servers to do some...
nitass
Employee
Feb 06, 2014this is mine.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when HTTP_RESPONSE {
log local0. "before \[HTTP::header Location\]=[HTTP::header Location]"
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map -nocase {"http://" "https://"} [HTTP::header Location]]
}
log local0. "after \[HTTP::header Location\]=[HTTP::header Location]"
}
}
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Feb 6 05:39:51 ve11a info tmm[13662]: Rule /Common/myrule : before [HTTP::header Location]=http://www.domain.com/somethingelse
Feb 6 05:39:51 ve11a info tmm[13662]: Rule /Common/myrule : after [HTTP::header Location]=https://www.domain.com/somethingelse
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