Forum Discussion
Vijay_E
Dec 05, 2016Cirrus
When posting iRule, please use formatting for ease of reading. This is your iRule:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/fmstorefront"} {
pool qa.fmmpe-cat.com_80
} elseif { [HTTP::uri] starts_with "/medias"} {
pool qa.fmmpe-cat.com_80
} elseif { [HTTP::uri] starts_with "/fmwebservice"} {
pool qa.fmmpe-cat.com_80
} elseif { [HTTP::uri] starts_with "/ipows"} {
pool qa.fmmpe-cat.com_80
} else {
HTTP::redirect "https://d2ipxxe5h4s25e.cloudfront.net"
}
}
I would recommend using a datagroup like this as there is a common pool for the matches URI:
when HTTP_REQUEST {
if { [class match [HTTP::uri] starts_with CLASS_URI] } {
pool qa.fmmpe-cat.com_80
} else {
HTTP::redirect "https://d2ipxxe5h4s25e.cloudfront.net"
}
}
CLASS_URI is a datagroup.