Forum Discussion
JeffRay_129268
Nimbostratus
May 26, 2015irule issue
Hi Forum,
I am having one issue of syntax, i have already an irule available for 2 requirements (1 and 2 below) which is working fine. Issue is i need to incorporate solution for the 3rd requirement ...
cjunior
Nacreous
May 29, 2015OK, if I understood well, needs to check if the uri is not simply "/" so don't need to be redirected.
Please let me know if I got it. [ ]when HTTP_REQUEST {
HTTP::header remove Accept-Encoding
STREAM::disable
redirect autodiscover requests to autodiscover site https
if { [string tolower [HTTP::path]] equals "/autodiscover/autodiscover.xml" } {
HTTP::respond 301 Location https://autodiscover.mynetwork.us/autodiscover/autodiscover.xml
redirect mynetwork.us to https://www.mynetwork.us along with any uri
} elseif { [string tolower [HTTP::host]] equals "mynetwork.us" } {
HTTP::respond 302 Location https://www.mynetwork.us[string trimright [HTTP::uri] "/"]
redirect if uri is not / but ends with it
} elseif { !([HTTP::uri] equals "/") and [HTTP::uri] ends_with "/" } {
HTTP::respond 302 Location http://[HTTP::host][string trimright [HTTP::uri] "/"]
}
}
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