Forum Discussion
Todd_VanDerwerk
Nimbostratus
Oct 05, 2006HTTPS Redirect
I have this iRule in place
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
and I am getting this error
TCL error: Rule redirect_to_https - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]"
Any ideas?
3 Replies
- Deb_Allen_18Historic F5 AccountThat error usually occurs when another iRule applied to the same virtual before this iRule has already issued a redirect.
You'll need to change the existing redirect code in the iRule(s) applied BEFORE this one to prevent subsequent rules from being processed for this request, and to prevent subsequent requests on Keep-Alive connections. To do so, use HTTP::respond instead of HTTP::redirect so you can add a Close header, and since the following rule only has the event HTTP_REQUEST, disable that event:HTTP::respond 302 Location https://[getfield [HTTP::host] ":" 1][HTTP::uri] Connection Close event HTTP_REQUEST disable
HTH
/deb - Todd_VanDerwerk
Nimbostratus
Thank you for the response, but this is the only iRule applied to this virtual server, but I do have the same iRule applied to a different virtual server without issue - Colin_Walker_12Historic F5 AccountIf you have the same rule applied to a different virtual without any problems, then it sounds like the issue isn't with the iRule at all. What's different about this VIP's configuration?
Colin
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