Forum Discussion
TCL Error on iRule
We do have 2 other iRules on that virtual server. The user agent re-write is the first listed. The next has the following code in it (not the prettiest or most efficient code but it's worked).
when HTTP_REQUEST {
if { [HTTP::uri] contains "/useradmin/"} {
redirect to "/"
}
if { [HTTP::uri] contains "/nwa/"} {
redirect to "/"
}
if { [HTTP::uri] contains "/wsnavigator/"} {
redirect to "/"
}
if { [HTTP::uri] equals "/webdynpro/welcome/Welcome.jsp"} {
redirect to "/"
}
if { [HTTP::uri] contains "/uddiclient/"} {
redirect to "/"
}
if { [HTTP::uri] contains "/sap/monitoring/"} {
redirect to "/"
}
if { [HTTP::uri] equals "/SQLTrace/index.html"} {
redirect to "/"
}
if { [HTTP::uri] equals "/index.html"} {
redirect to "/"
}
}
`
The last one contains the following code.
`when HTTP_REQUEST {
if { [info exists MAINTMODE] and $MAINTMODE eq "on" } { HTTP::respond 302 Location "http://hostname.company.us/portal_down/index.html"
} elseif {
[HTTP::uri] equals "/"} {HTTP::redirect "/irj/portal/" }
}So yes, they both have HTTP::respond and redirect action in them. It's always been our understanding that iRules simply process in order. One after the other. We've been doing multiple iRules on virtual servers with most of them containing a respond or redirect action for years. Was this a recent change in behavior if it's not allowed?
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
