Another method would be to use the switch statement instead of if. If you plan to add additional redirects in the future, it may look a little cleaner...
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::host]] {
"cardiosmart.org" -
"*healthandwellness.cardiosmart.org*" {
HTTP::respond 301 Location "XXXXX[HTTP::uri]"
return
}
}
}
Because the code block messes up hyperlinks, replace the XXXXX with https://www.cardiosmart.org.
In this case, the -glob says to allow wildcards in the checks, and you have two conditions (the second which uses the * wildcard) that will cause the HTTP redirect response. With this format, if you needed to add new hosts to redirect, you would just add a - at the end of the healthandwellness line and put the additional host on the next line.
Additional documentation regarding if/elseif/else and switch statements can be found here