Forum Discussion
Hooni_L
Cirrus
I think use date-group list and 'IF' on irule.
I couldn't test it, but I checked that it was set up in the equipment.
refer below irule and datagroup list:
when HTTP_REQUEST {
if { [class match [HTTP::header values "True-Client-IP"] eq dg-client-ip] } {
HTTP::respond 400 content "site currently unavailable, Please try again later"
} elseif { [class match [HTTP::host] eq dg-domain] } {
HTTP::respond 301 Location "https://www.[HTTP::host][HTTP::uri]" "Connection" "Close"
return
}
}
Yesh1923
Jan 20, 2023Nimbostratus
i add below but its not working as expected , web page not loading
when HTTP_REQUEST {
if { [class match [HTTP::header values "True-Client-IP"] eq mo-client-ip] } {
HTTP::respond 400 content "site currently unavailable, Please try again later"
} elseif { [class match [HTTP::host] eq mo-domain] } {
HTTP::respond 301 Location "https://www.[HTTP::host][HTTP::uri]" "Connection" "Close"
return
}
}