Forum Discussion
DaveC_53879
May 02, 2012Nimbostratus
Configsync failing due to rule syntax
I have a new rule that works correctly redirecting traffic from one domain to another domain with an extra dash in the domain name. Pretty straightforward. But when I try to sync the configs to the ...
Joel_Moses
May 02, 2012Nimbostratus
9.4.6 had some oddities about placement of curly-braces in iRules. Try this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"www.site1.com" -
"site1.com" {
HTTP::redirect "http://www.site-1.com[HTTP::uri]"
}
}
}
I've seen instances where the 9.x parser seemed to think consecutive curly-braces on the same line marked the end of the iRule in the config erroneously. It's been fixed in 10.x and above.
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