Forum Discussion
gr0x_33657
Nimbostratus
Nov 03, 2009URI Redirect
Hi,
We would like to redirect all traffic to our maintenance page, so far if someone calls the domain name for example "www.domainname.com" the irule works and redirects the person to "...
The_Bhattman
Nimbostratus
Nov 03, 2009or you can do this
when HTTP_REQUEST {
if {[HTTP::host] eq "www.domainname.com") } {
switch -glob [HTTP::path] {
"/" { HTTP::redirect "/maintenance.html" }
"/sitefolder" { HTTP::redirect "/maintenance.html" }
default { HTTP::redirect "/maintenance.html" }
}
}
}
Basically if doesn't match any of the paths select then the default will always match.
CB
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
