diff options
-rw-r--r-- | swat/index.esp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/swat/index.esp b/swat/index.esp index 7023a9e102..037e88836c 100644 --- a/swat/index.esp +++ b/swat/index.esp @@ -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> |