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: R...
Deb_Allen_18
Oct 05, 2006Historic F5 Account
That 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
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