DM_5174
Mar 11, 2011Nimbostratus
independant from case-sensitive URI path httpS redirect
Hi All,
I was wondering if I could get some help from all of the i-rule gurus here.
Below is an i-rule we have that will 1) add "www" to the URI if a user forgets to put it in, and
2) if the user specify "/Mgt/Portal/LogOn" in the URI (for example http://www.abc.test.com/Mgt/Portal/LogOn" they will get redirected to HTTPS "httpS://www.abc.test.com/Mgt/Portal/LogOn".
Currently we only want to trigger this because by default site www.abc.com should NOT be HTTPS.
1. Is there a way to make it where if the the path "/Mgt/Portal/LogOn" can independant from case-sensitive charaters? So if the user puts /MgT/porTal/login" you still get HTTPS
2. And also consolidate this into a effcient irule and not use two "if" statment?
Thanks all in advance!
-DM
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.test.com" } {
HTTP::redirect "http://www.abc.test.com[HTTP::uri]"
}
if { [HTTP::path] equals "/Mgt/Portal/LogOn" } {
HTTP::redirect "https://www.abc.test.com[HTTP::uri]"
}