Forum Discussion
eduardo_26187
Nimbostratus
Mar 17, 2010iRule multiple redirect/respond invocations not allowed
Hi all,
There is a rule which is sending these messages to the logs, although the rule it's redirecting correctly. Nevertheless I have reports that some people visit the web page with "http" but it doesn't redirect to "https".
How could be possible that sometimes redirects and in few cases it doesn't?
This is my log:
Mar 17 08:59:02 tmm1 tmm1[12154]: 01220001:3: TCL error: rule_redirect_http2https - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "HTTP::redirect "https://[HTTP::host]/Login.jsp"
Mar 17 09:03:59 tmm1 tmm1[12154]: 01220001:3: TCL error: rule_redirect_http2https - Operation not supported. Multiple redirect/respond invocations not allowed (line 9) invoked from within "HTTP::redirect "https://[HTTP::host]/Login.jsp"
This is the rule
when HTTP_REQUEST {
Check if the URI is /
if {[HTTP::path] eq "/"}{
HTTP::redirect "https://[getfield [HTTP::host] : 1]/Login.jsp"
}
if {
[TCP::local_port] == 80
} {
HTTP::redirect "https://[getfield [HTTP::host] : 1]/Login.jsp"
}
}
Thanks in advanced.
5 Replies
- hoolio
Cirrostratus
So if a client makes a request over port 80 for / both paths through the iRule will try to send a redirect. - eduardo_26187
Nimbostratus
Hello Mr. Aaron, the HTTP VIP is like 1.2.3.4:443 - hoolio
Cirrostratus
If someone makes a request to http://vip:443 they could make an unencrypted HTTP request to an HTTPS VIP. But the port would always be 443.http://devcentral.f5.com/wiki/default.aspx/iRules/Redirect_non_ssl_requests_on_ssl_vs_rule.html when HTTP_REQUEST { Check if the client used an SSL cipher if {not ([catch {SSL::cipher version} result]) && $result ne "none"}{ Client did use a cipher log local0. "\$result: $result. Allowing encrypted request." if {[HTTP::path] eq "/"}{ HTTP::redirect "https://[getfield [HTTP::host] : 1]/Login.jsp" } } else { Client did not use a cipher log local0. "\$result: $result. Redirecting unencrypted request." HTTP::redirect "https://[getfield [HTTP::host] : 1]/Login.jsp" } }
- eduardo_26187
Nimbostratus
Thanks. This solutions is better. - Albert_Aguinaga
Nimbostratus
Hi - I'm getting the following error:
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