Forum Discussion
Jorge_48257
Apr 18, 2011Nimbostratus
Simple URI iRule Request
For example:
request - https://example.domain.com
redirect - https://example.domain.com/example1
I would also like to exclude/ignore one sepicific uri.
request - https://example.domain.com/example2 - if URI = example2 then leave it alone.
Thanks!
4 Replies
Sort By
- So what you're looking for is something like:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri] { "" - "/" { HTTP::redirect "https://example.domain.com/example1" } }
- Here is what ended up working for me after identifying all the URIs I needed. Looks messy but it works.
- just for your information in case u may have not seen it.
- I 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" } } }
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