Forum Discussion
bwilliam
Cirrus
Dec 03, 2015irule To Redirect A Specific Network Going To a URL
I have an office in India and need to send any request from that network for site.domain.com to local.domain.com. If the network is not equal India_Host_Networks then hit site.domain.com. I think I h...
bwilliam
Cirrus
Dec 04, 2015Thank 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]"
}
}
}
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