AEisiminger_192
Dec 02, 2010Historic F5 Account
IRule to Replace http:// with https://
I'm posting this for future users looking for a solution on how to redirect request to https that come in on http.
This IRule will match the HOST and URI and send the connection back over to the HTTPS VIP.
when RULE_INIT {
Enables or Disables debuging, set to 1 to enable 0 to disable
set static::debug 0
}
when HTTP_REQUEST {
Log incoming request information.
if { $static::debug } { log local0.alert "[HTTP::host] [HTTP::uri]" }
set new_url "https://"
append new_url [HTTP::host]
append new_url [HTTP::uri]
HTTP::redirect $new_url
Log Redirect sting
if { $static::debug } { log local0.alert " $new_url" }
}