Forum Discussion
Sams_88783
Nimbostratus
Aug 23, 2010Please help in converting v4.x irule to 9.x
Hello,
I tried to convert the below 4.x irule to 9.x but i am getting error.Please help me in converting the same.
if (http_host == "mydomian.com" and http_header("WL-Proxy-SSL") != "true") {
redirect to "https://mydomain.com/%u"
}
else if (http_host == "mydomian.com" and http_uri ends_with "/") {
redirect to "https://mydomian.com/index.html"
}
else if (http_host == "www.mydomianone.com" and http_uri ends_with "/") {
redirect to "https://www.mydomianone.com/index.html"
}
else if (http_host == "mydomianone.com" and http_uri ends_with "/") {
redirect to "https://mydomianone.com/index.html"
}
else if (http_host == "mydomianone.com" and http_header("WL-Proxy-SSL") != "true") {
redirect to "https://www.mydomianone.com/%u"
}
else if (http_host == "www.mydomianone.com" and http_header("WL-Proxy-SSL") != "true") {
redirect to "https://www.mydomianone.com/%u"
}
else if (http_host == "192.160.1.1") {
discard
}
else {
use pool MYDOMIAN
}
- Sams_88783
Nimbostratus
Still waiting for help on this ? - Sams_88783
Nimbostratus
Still waiting for help on this - This should work. Probably not optimal, but it's the same logic
when HTTP_REQUEST { if { ([HTTP::host] eq "mydomain.com") && ![HTTP::header exists "WL-Proxy-SSL"] } { HTTP::redirect "https://mydomain.com[HTTP::uri]" } elseif { ([HTTP::host] eq "mydomain.com") && ([HTTP::uri] ends_with "/") } { HTTP::redirect "https://mydomain.com/index.html" } elseif { ([HTTP::host] eq "www.mydomainone.com") && ([HTTP::uri] ends_with "/") } { HTTP::redirect "https://www.mydomainone.com/index.html" } elseif { ([HTTP::host] eq "mydomainone.com") && ([HTTP::uri] ends_with "/") } { HTTP::redirect "https://mydomainone.com/index.html" } elseif { ([HTTP::host] eq "mydomainone.com") && ![HTTP::header exists "WL-Proxy-SSL"] } { HTTP::redirect "https://www.mydomainone.com[HTTP::uri]" } elseif { ([HTTP::host] eq "www.mydomainone.com") && ![HTTP::header exists "WL-Proxy-SSL"] } { HTTP::redirect "https://www.mydomainone.com[HTTP::uri]" } elseif { [HTTP::host] eq "192.160.1.1" } { discard } else { pool MYDOMAIN } }
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