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:/...
Jorge_48257
Nimbostratus
Apr 22, 2011Here is what ended up working for me after identifying all the URIs I needed. Looks messy but it works.
when HTTP_REQUEST {
if {[HTTP::uri] contains "/Microsoft-Server-ActiveSync" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/owa" } {
HTTP::uri "[HTTP::uri]"
}else {
if {[HTTP::uri] contains "/ecp" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/Autodiscover" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/EWS" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/Exchange" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/Exchweb" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/OAB" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/Public" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/rpc" } {
HTTP::uri "[HTTP::uri]"
} else {
if {[HTTP::uri] contains "/RpcWithCert" } {
HTTP::uri "[HTTP::uri]"
} else {
HTTP::uri "/owa"
}
}
}
}
}
}
}
}
}
}
}
}
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