Forum Discussion
Yesh1923
Nimbostratus
3 years agoMultiple http_request iRules not working Same Virtual server
how to merge this 2 irule when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "energy.com") HTTP::respond 301 location "https://www.[HTTP::host][HTTP::uri]" Connection Close } } ...
Hooni_L
Cirrus
3 years agoHi
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