Forum Discussion
rabid_gerbil_26
Cirrus
Apr 03, 2019iRule 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 nam...
Andy_McGrath
Cumulonimbus
Apr 04, 2019Your first iRule is the
HTTP::header
command think you need to include the key word value
in 14.
when HTTP_REQUEST {
Rewrite the User-Agent header value if it's empty
if {([string length [HTTP::header value "User-Agent"]] == 0) || !([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)"
}
}
With your second iRule looks ok other than the formatting and the perfect use case for using
switch
, give the following a try and see if this fixes the errors:
when HTTP_REQUEST {
if {([HTTP::uri] eq "/portal/") || ([HTTP::uri] eq "/")} {
switch -glob [HTTP::host] {
"URL*" {HTTP::redirect "http://www.URL.org/contact-us/contact-us.aspx"}
"path1*" {HTTP::redirect "http://www.anotherURL.com/applications/path1/contact-us.aspx"}
"path2*" {HTTP::redirect "http://www.anotherURL.com/applications/path2/contact-us.aspx"}
"path3*" {HTTP::redirect "http://www.anotherURL.com/applications/path3/contact-us.aspx"}
"path*" {HTTP::redirect "http://www.anotherURL.com/Contact-Us/Contact-Us.aspx"}
}
}
}
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