Forum Discussion
Hooni_L
Jan 18, 2023Cirrus
Hi
If you share one more method, you can also leverage datagroup.
when HTTP_REQUEST {
if { class match [string tolower [HTTP::host]] equals DATAGROUP-NAME } {
HTTP::respond 301 Location "https://www.[HTTP::host][HTTP::uri]" "Connection" "Close"
return
} elseif { class match [string tolower [HTTP::host]] equals DATAGROUP-NAME } {
HTTP::respond 301 Location "https://www.ndtv.com" "Connection" "Close"
return
}
}
DATAGROUP-NAME Include
Type String
String :
energy.com
goodenergy.com
oddenergy.com