Forum Discussion
Tony2020
Nimbostratus
Nov 08, 2016LTM displaying notification based on matching muliple DNS alias/hostnames tied to the VIP
Hi All, I have tired to get this working but it does not seem to be. Here is what we need to do. When users comes in as or (DNS alias) that points to this same VIP, we want the F5 to loo...
Kai_Wilke
MVP
Nov 08, 2016Hi Tony,
you may try the iRule below as a starting point...
when HTTP_REQUEST {
switch -exact -- [string tolower [HTTP::host]] {
"host1" -
"host2" {
switch -exact -- [HTTP::uri] {
"/decommission-message" {
HTTP::respond 200 content "
Link Decommission Notification
Dear All:
Please note that the site/domain for \"Host1\" and \"Host2\" will no longer be used.
We apologize for any inconvenience, please use \"NewHostLink\" instead.
Thank you.
" "Content-Type" "text/html"
}
default {
HTTP::redirect "/decommission-message"
}
}
}
}
}
Note: The line
contains a $stime variable that is not defined in this iRule. You have to check that the variable is defined somewhere else, otherwise the HTTP::response will throw an error.*
Cheers, Kai
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