rabid_gerbil_26
Apr 03, 2019Cirrus
iRule Errors when upgrading to v14.1
All -
We just upgraded our F5 LTM to v14.1 from v11.6.3 successfully. However, now that we are running on v14.1, we are getting a lot of iRule errors in our LTM Logs.
I have edited the iRule names & paths of URLs & URIs for security purposes.
Any help with these iRule changes would be greatly appreciated.
Examples of the errors are:
TCL error: /Common/iRule_1 - ERR_NOT_SUPPORTED (line 2) invoked from within "HTTP::header "User-Agent""
The iRule has the following:
when HTTP_REQUEST {
Rewrite the User-Agent header value if it's empty
if { [string length [HTTP::header "User-Agent"]] == 0 || not [HTTP::header exists "User-Agent"] }{
Replace the User-Agent header with a default value
HTTP::header replace "User-Agent" "Mozilla/4.0 (compatible; No User Agent Provided)"
}
}
Another Example error:
TCL error: /Common/redirect_irule - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::uri"
TCL error: /Common/redirect_irule - ERR_NOT_SUPPORTED (line 7) invoked from within "HTTP::uri"
The iRule has the following:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/portal/" or [HTTP::uri] equals "/"} {
if {[HTTP::host] starts_with "URL"}{
HTTP::redirect "http://www.URL.org/contact-us/contact-us.aspx"}
if {[HTTP::host] starts_with "path"}{
HTTP::redirect "http://www.anotherURL.com/Contact-Us/Contact-Us.aspx"}
if {[HTTP::host] starts_with "path1"}{
HTTP::redirect "http://www.anotherURL.com/applications/path1/contact-us.aspx"}
if {[HTTP::host] starts_with "path2"}{
HTTP::redirect "http://www.anotherURL.com/applications/path2/Contact-us.aspx"}
if {[HTTP::host] starts_with "path3"}{
HTTP::redirect "http://www.anthoerURL.com/applications/path3/contact-us.aspx"}
}
}