i have a problem with the following iRule (i am quite new with iRules):
when HTTP_REQUEST {
evaluate characters as lower case Pass characters back to server in lower case
set my_uri [string tolower [HTTP::uri]]
if { $my_uri starts_with "/konto" } {
redirect to konto on matching URI
HTTP::redirect "https://[HTTP::host]/de/konto/"
log redirect
log local0. "Host is [HTTP::host], URI is [HTTP::uri]. Redirecting to konto"
}
}
If someone types http://www.mydomain.com/konto redirect works fine, but the URL ist https://www.mydomain.com/konto it does not (Page not found). Can someone tell me why? Does someone have a better solution? BTW: SSL is terminated on the LTM.
I assume you have two virtual servers configured on the same IP address: one on port 80 and 443. Do you have the same rule applied to both VIPs? If so, it looks like the rule should be working fine.
When a client requests https://www.mydomain.com/konto, does the BIG-IP log the host and URI you are expecting? Does the client actually receive the redirect to https://www.mydomain.com/ed/konto? You can use HTTP watch for IE or LiveHTTPheaders for Firefox to check the response the client gets.
I assume you have two virtual servers configured on the same IP address: one on port 80 and 443. Do you have the same rule applied to both VIPs? If so, it looks like the rule should be working fine.
[…]
That was the simple point! I have *not* applied the irule to the VIP on port 443. Stupid me, many thanks.