Forum Discussion
sandy16
Altostratus
Dec 03, 2014Irule help for host header redirection
Hi experts, I need to write an irule which will redirect some different host headers/urls to one single-different url. After doing some digging around on devcentral i found this one should do the job...
Sheigh_65772
Cirrus
Dec 03, 2014Here's another options as well, really just comes down to how much data you got and how you want to manage it. Personally I like the second options Shaggy suggested.
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
switch $host {
"site1.com" -
"site2.com" -
"www.site3.com" {
HTTP::redirect "https://mywebsite.com"
}
}
}
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