Forum Discussion
snjk_65602
Nimbostratus
Sep 25, 2012Need help to convert iRule from ver 4 to ver 11.
I have the follwoing iRule in ver 4-
rule LMS_dev{
if (http_host matches_regex "d2lstg.smu.edu.sg")
if (http_host matches_regex "d2lstg.smu.edu.sg") {
redirect to ""
}
else if (http_host matches_regex "xn--yfro4i6sbzxdg8th3unfm.edu.sg") {
redirect to "http://www.smu.edu.sg/%u"
}
The same has been convered to ver 11 as below but not working-
when HTTP_REQUEST {
if {[HTTP::host] matches_regex "d2lstg.smu.edu.sg"} {
HTTP::redirect "]"
}
elseif {[HTTP::host] matches_regex "xn--yfro4i6sbzxdg8th3unfm.edu.sg"} {
HTTP::redirect "http://www.smu.edu.sg/%u"
}
Pl help to resolve this. Thanks.
- nathe
Cirrocumulus
snjkwhen HTTP_REQUEST { switch -glob [HTTP::host] { "*d2lstg.smu.edu.sg*" { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } "*xn--yfro4i6sbzxdg8th3unfm.edu.sg*" { HTTP::redirect "http://www.smu.edu.sg[HTTP::uri]" } } }
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