d__383820
Feb 15, 2019Nimbostratus
URL Redirect Switch not detecting on host for base domain
I am wanting to redirect certain hosts to HTTPS for offload. my iRule is working for hosts within the domain (e.g. ) but not for base domain host (e.g. domain.com).
The below iRule is working for www and uat, but not the base domain. Any assistance for what is wrong.
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "domain.com" { HTTP::respond 301 Location "https://domain.com[HTTP::uri]"} "; { HTTP::respond 301 Location "https://www.domain.com[HTTP::uri]"} "uat.domain.com" { HTTP::respond 301 Location "https://uat.domain.com[HTTP::uri]"} default {pool default_pool} } }