Forum Discussion
Peter__Chan_109
Nimbostratus
Sep 30, 2005Rules convert problem from 4.5.12 to v9
Hi folks,
Could anyone please help figure out my problem to convert a rule from v4.5.12 to v9? I'm using the OTCU conversion during an upgrade from v4.5.12 to v9.1 but it always show syntax error in the rules portion. The rule syntax is as follows:
load balancing rules
rule webservice {
if (http_host matches_regex "www.test.com.hk") {
use pool http4_pool
}
else {
use pool http_pool
}
}
rule redirect_rule {
redirect to "http://example.test.com/%u"
}
rule http_redirect {
if (substr(tcp_content(2), 0, 2) == "X") {
use pool test80
}
else {
use pool test84
}
}
rule http_redirect_80 {
if (substr(tcp_content(1), 0, 1) == "X") {
use pool testing_pool
}
else {
use pool testing_pool84
}
}
rule http_redirect_84 {
if (substr(tcp_content(2), 0, 2) == "X") {
use pool testing_pool
}
else {
use pool testing_pool84
}
}
rule https_redirect_443 {
if (substr(tcp_content(2), 0, 2) == "X") {
use pool https_pool
}
else {
use pool https_443_pool
}
}
rule webservice {
if (http_host matches_regex "test.domain.com" or http_host matches_regex "www.domain.com") {
use pool http2_pool
}
else {
use pool http_pool
}
}
:D
Please help.
Many thx
- JRahm
Admin
Your first rule might look like this in v9rule webservice { when HTTP_REQUEST { if {[HTTP::host] eq "www.test.com.hk"} { use pool http4_pool } else { use pool http_pool } } }
- unRuleY_95363Historic F5 AccountYou should contact support to open a case for the otcu problem so they can collect the necessary information and determine why it is not working.
- unRuleY_95363Historic F5 AccountHere's an example of how to convert one of your other rules:
rule http_redirect { if (substr(tcp_content(2), 0, 2) == "X") { use pool test80 } else { use pool test84 } }
rule http_redirect [ when CLIENT_ACCEPTED { TCP::collect } when CLIENT_DATA { if { [TCP::payload] starts_with "X" } { use pool test80 } else { use pool test84 } TCP::release } }
rule webservice { if { ([HTTP::host] eq "test.domain.com") or ([HTTP::host] eq "www.domain.com")} { use pool http2_pool } else { use pool http_pool } }
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