Forum Discussion
bwilliam
Dec 04, 2015Cirrus
Thank you both for your answers. I have an existing irule we call Universal Redirect can the irule we worked on be applied in the Universal Redirect? Below is the start of the irule. If I add the new code like the below will that work?
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"*sitename.domain.com*" {
add the redirect link to "sitename.domain.com"
HTTP::redirect "https://sitename.domain.com"
}
"*sitename.domain.com*" {
HTTP::redirect "https://sitename.domain.com"
}
if { ([class match [IP::client_addr] equals India_Host_Networks]) and ([string tolower [HTTP::host]] equal "site.domain.com") } {
HTTP::redirect " https://local.domain.com/stream/"
}
default {
add the default action you prefer ie "www.def.com"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}