Forum Discussion
Ravi_Rajan_7549
Nimbostratus
Feb 16, 2007Redirect Rule with MatchClass
Hi,
I am new to irules and need some help. I have a current rule like this -
when HTTP_REQUEST {
if { [matchclass [ string tolower [HTTP::uri] ] contains $::xyz]}
{HTTP:...
Feb 16, 2007
You can either use the "!" (not) operator or an else clause.
when HTTP_REQUEST {
if { ![matchclass [ string tolower [HTTP::uri] ] contains $::xyz] } {
HTTP::redirect "http://172.25.10.10/offline/appsoffline.html"
}
}-or-
when HTTP_REQUEST {
if { [matchclass [ string tolower [HTTP::uri] ] contains $::xyz]} {
} else {
HTTP::redirect "http://172.25.10.10/offline/appsoffline.html"
}
}Either should work...
-Joe
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