Forum Discussion
tcl error on iapp irule
Hi Kai,
the error message occours if an iRule tries to Read / Rewrite a HTTP request, which is already responded by an previous iRule.
You can circumvent this behavior by changing the the first iRule so that it disables further iRule processing after the HTTP redirect is send.
when ACCESS_ACL_ALLOWED {
set type [ACCESS::session data get session.client.type]
if { !($type starts_with "citrix") } {
if { [HTTP::uri] == "/" } {
log local0. "Redirecting to /Citrix/Web/"
ACCESS::respond 302 Location "https://[HTTP::host]/Citrix/Web/" "Connection" "Close"
TCP::close
event disable all
}
}
}
Note: The
parameter and the "Connection" "Close"
command is required, to force the client to establish a new TCP connection after the redirect is send and further iRule processing is disabled. This makes sure that subsequent request will process iRules again...TCP::close
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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