But somehow in this section ignore case is not working.does it relate to if-else order?
Any help with this is appreciated. If there is a better way to write this e.g.
[root@ve10:Active] config b class host_class list
class host_class {
{
"domain1.mydomain.com"
"domain2.mydomain.com"
"domain3.mydomain.com"
"domain4.mydomain.com"
"domain5.mydomain.com"
"domain6.mydomain.com"
}
}
[root@ve10:Active] config b class uri_class list
class uri_class {
{
"/acme/"
"/acon/"
"/airb/"
"/amt/"
"/autm/"
"/avio/"
"/clb/"
"/conc/"
"/cpd/"
"/cpro/"
"/edc/"
"/ems/"
"/et/"
"/evt/"
"/fg/"
"/fl/"
"/fms/"
"/ge/"
"/gsm/"
"/hwlm/"
"/iif/"
"/kbdn/"
"/lepn/"
"/let/"
"/mae/"
"/mass/"
"/ooh/"
"/preference/"
"/pten/"
"/pvm/"
"/qp/"
"/qur/"
"/rdb/"
"/rpn/"
"/sdce/"
"/secu/"
"/sst/"
"/stec/"
"/utp/"
"/wmw/"
"/yg/"
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { [class match -- [HTTP::host] equals host_class] or
[class match -- $uri contains uri_class] } {
pool WEBFORMS
} elseif { $uri starts_with "/webservices/rest/brand/" } {
if { $uri contains "/dataqueue"} {
HTTP::redirect "http://[HTTP::host]/cgi-win/rqueue.cgi?param=[HTTP::uri]"
} elseif { $uri contains "/comp" } {
HTTP::redirect "http://[HTTP::host]/cgi-win/rcref.cgi?param=[HTTP::uri]"
} else {
HTTP::redirect "http://[HTTP::host]/cgi-win/rlookup...[HTTP::uri]"
}
} else {
do something
}
}
}