summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swat/index.esp6
1 files changed, 5 insertions, 1 deletions
diff --git a/swat/index.esp b/swat/index.esp
index 037e88836c..373bd9f74e 100644
--- a/swat/index.esp
+++ b/swat/index.esp
@@ -7,7 +7,11 @@ redirecting you to the test pages ...
<%
if (server['SERVER_PROTOCOL'] == "http" &&
server['TLS_SUPPORT'] == "True") {
- redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
+ if (headers['HOST']) {
+ redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
+ } else {
+ redirect("https://" + server['SERVER_NAME'] + ":" + server['SERVER_PORT'] + request['REQUEST_URI']);
+ }
} else {
redirect("esptest/index.esp");
}