r7044: vance is right that mixing http and https elements gives a warning in IE
[samba.git] / swat / index.esp
index 7023a9e102e7c15e11a664996e8ab2319c3b8e53..037e88836c7c1d1f26cb918dab6758de1842f4dd 100644 (file)
@@ -5,7 +5,12 @@ Samba4 ESP test
 <BODY>
 redirecting you to the test pages ...
 <%
-  redirect("esptest/index.esp");
+if (server['SERVER_PROTOCOL'] == "http" &&
+    server['TLS_SUPPORT'] == "True") {
+       redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
+} else {
+       redirect("esptest/index.esp");
+}
 %>
 </BODY>
 </HTML>