Forum Discussion
Jorge_48257
Nimbostratus
Apr 18, 2011Simple URI iRule Request
Need some quick help on what I believe to be a simple irule. I'm looking to create an irule that does a simple redirect if the requested site has no uri.
For example:
request - https:/...
hoolio
Cirrostratus
Apr 22, 2011I think you can clean that up with a switch statement:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/microsoft-server-activesync*" -
"/owa*" -
"/ecp*" -
"/autodiscover*" -
"/ews*" -
"/exchange*" -
"/exchweb*" -
"/oab*" -
"/public*" -
"/rpc*" { do nothing for these paths}
"/rpcwithcert*" {
Rewrite the URI to /owa
HTTP::uri "/owa"
}
}
}
Also, you don't need to set HTTP::uri to [HTTP::uri] in your example. You could just leave the clause empty to do nothing.
Aaron
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