Forum Discussion
TenYr_214337
Nimbostratus
Aug 05, 2015iRules Redirect Site to Site
Question: I have created this Redirect. Can anyone tell me why this is not working?
when HTTP_REQUEST {
set host_lowcase [string tolower [HTTP::header "Host"]]
switch -glob $host_lowcase...
Hannes_Rapp
Nimbostratus
Aug 05, 2015Sorry but this iRule has too many problems to bring out anything in particular. Please modify the iRule below to meet the requirements of your environment.
HTTP_REQUEST {
switch [HTTP::host] {
"mysite.mynet.com" {
HTTP::respond 302 location "https://mynew.mynet.com[HTTP::uri]"
}
"mysite2.mynet.com" {
HTTP::respond 302 location "https://mynew2.mynet.com[HTTP::uri]"
} default {
return
apply no redirect
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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