Choi
Mar 16, 2021Nimbostratus
Help iRule
Hi, iRule is not working. Please help me. Redirect action does not work. Data Group Lists EX) Deny - Address 1.1.1.0/24 Accept - Address 2.2.2.0/24 Allow - string test/ealog...
Hi Choi,
Can you remove [HTTP::path] equals "/" from iRule, and try?
when HTTP_REQUEST {
if { [HTTP::host] equals "vdi.lost.com" && [class match [IP::client_addr] equals Deny] } {
HTTP::respond 200 content [ifile get notice] "Content-type" "text/html"
}
elseif { [HTTP::host] equals "vdi.lost.com" && [class match [IP::client_addr] equals Accept] && not [class match [HTTP::uri] equals Allow] } {
HTTP::redirect "https://vdi.lost.com/test/first/eamain"
}
else {
pool test_pool
}
}
Strings in the datagroup named "Allow" must start with "/".