Forum Discussion
Yesh1923
Jan 17, 2023Nimbostratus
Multiple 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
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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects