Forum Discussion
Ted_Kircos_1126
Nimbostratus
Nov 24, 2006Need help - Before i pull my hair out!!!
Getting the following trying to add the irule below... Im stumped... Anyone see whats wrong or how to fix it? line 8: [undefined procedure: http://] ["http://" + [HTTP::header "AP_LOCHOST"]]...
Ted_Kircos_1126
Nimbostratus
Nov 28, 2006i am getting the following in the logs
Nov 28 13:44:23 tmm tmm[710]: Rule dev1.clarica.com_https-irule : Status: 302
Nov 28 13:44:23 tmm tmm[710]: Rule dev1.clarica.com_https-irule : location: https://dev1.clarica.com/bcheck.html?redir=/e/signin/index.asp
Nov 28 13:44:23 tmm tmm[710]: Rule dev1.clarica.com_https-irule : find: http://
Nov 28 13:44:23 tmm tmm[710]: Rule dev1.clarica.com_https-irule : replace: https://
Nov 28 13:44:23 tmm tmm[710]: 01220001:3: TCL error: Rule dev1.clarica.com_https-irule - can't read "original_string": no such variable while executing "string map {$find1 $replace1 $find2 $replace2} $original_string"
with the follow irule
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
log local0. "Status: [HTTP::status]"
set location [HTTP::header "Location"]
log local0. "location: $location"
if { $location != "" } {
if {[HTTP::header "AP_NO_SSL_REDIR"] == "" } {
set find [concat "http://" [HTTP::header "AP_LOCHOST"]]
log local0. "find: $find"
set replace [concat "https://" [HTTP::header "AP_LOCHOST"]]
log local0. "replace: $replace"
set my_new_string [string map {$find1 $replace1 $find2 $replace2} $original_string]
log local0. "newlocation: $newlocation"
HTTP::header replace $location $newlocation
log local0. "replaced location header"
}
}
}
}
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