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 26, 2015Hi JeffRay,
I hope I have understood because the code is not properly formatted here.
Perhaps be most interesting rewrite the uri and follow in instead of redirecting the site.
Anyway, I made some adjustments and hope it works for you.
Just one question:
Did you have www.mynetwork.us in HTTP?
Maybe you can change the operator from "equals" to "ends_with" at line:
} elseif { [string tolower [HTTP::host]] equals "mynetwork.us" } {
Regards
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 ends with /
} elseif { [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