Forum Discussion
Micros_88999
Nimbostratus
May 08, 2014https to http force iRule worked on 9.4.6 doesn'twork at 11.4
Hello,
We would have the below iRules which worked for us at BIG-IP 9.4.6 Build 401.0 Final version. We force https traffic to http and rewrite the answer from the pool member.
Now we migrated ...
Kevin_Stewart
Employee
May 09, 2014I believe there's an issue with HTTP::is_redirect in 11.4 (and 11.5). Are you seeing any errors in /var/log/ltm? Please try the following:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "/website/Welcome.do"
} else {
eval [LB::select]
set orig_fqdn [HTTP::host]
set selected_server "[LB::server addr]:[LB::server port]"
if { [HTTP::host] contains "ourdomain.com" } {
HTTP::header replace host $selected_server
}
}
}
when HTTP_RESPONSE {
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map [list $selected_server $orig_fqdn] [HTTP::header Location]]
if { [HTTP::header "Location"] contains "http://" } {
HTTP::header replace Location [string map [list "http://" "https://"] [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