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, I understand that this iRule will be applied on a standard VS HTTP with stream profile assigned therefore believe that meets what you need.
[ ]1- If anyone types HTTP based mynetwork.us then it should be redirected to HTTPS based https://www.mynetwork.us .
} elseif { [string tolower [HTTP::host]] equals "mynetwork.us" } {
HTTP::respond 302 Location https://www.mynetwork.us[string trimright [HTTP::uri] "/"] }
2- If in path there is /autodiscover/autodiscover.xml then it should be redirected to autodiscover site with 301 permanent redirected message.
if { [string tolower [HTTP::path]] equals "/autodiscover/autodiscover.xml" } {
HTTP::respond 301 Location https://autodiscover.mynetwork.us/autodiscover/autodiscover.xml }
3- If there is / at the end of any URI then / at then end of URI should be removed and client should get back one with removed /.
} 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