Forum Discussion
Abuhasan_116587
Nimbostratus
Jun 03, 2016question regardaing Irule
Hi All
Maintenance page is hosted in server.When type in https://abc.com i am getting maintenance page .
However Acessing https://abc.com/*,its not redirecting to the Maintenance page .
For exa...
Yann_Desmarest
Cirrus
Jun 03, 2016Hi,
Here a typical example. I added some more code to show you how switch works and also the use of HTTP::respond as an alternative to HTTP::redirect :
when HTTP_REQUEST {
switch -glob [HTTP::path] {
"/test" {
HTTP::redirect "https://test.com"
}
"/*" {
HTTP::redirect "https://maintenancepage.com"
}
"/" {
HTTP::respond 302 noserver "Location" "https://maintenacepage.com" "Cache-Control" "no-cache, must-revalidate"
}
}
}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