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]"
}
For some reason this did not work. We need to make it exactly like this “/Mgt/Portal/LogIn” since the link is case-sensitive on the backend server no matter how the user puts in the uri path.
Also, this rule also disable the function where users adding in “abc.test.com/abc”, it does not append the “www”. It shoudl be http"//www.abc.com/abc".
For some reason this did not work. We need to make it exactly like this “/Mgt/Portal/LogIn” since the link is case-sensitive on the backend server no matter how the user puts in the uri path.
He wants the actual redirect to be case sensitive, but the detection to be insensitive… Soo, after to you set your string to lower for the detection, specify the actual uri for redirection, “/Mgt/Portal/LogIn”
Not sure either why the append for ‘www’ isn’t working for you, looks fine..
When I used “/Mgt/Portal/LogIn” It worked (gave me httpS) even if I went in with lower case. The funny thing is when I specify the opposite, lower case “/mgt/portal/login”, it does not redirect me to httpS. For some reason our application requires specific case sensitive letters in order to present you with the login page, but now I am getting the SSL connection and everything else seems to work when I re-ordered things around in the code.