Просмотр исходного кода

Dont redirect to webmail if vesta is not behind nginx

myvesta 7 лет назад
Родитель
Сommit
fdb6baf7ae
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      web/inc/secure_login.php

+ 5 - 3
web/inc/secure_login.php

@@ -1,7 +1,9 @@
 <?php
-if (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI']=="/") {
-	header("Location: /webmail/");
-	exit;
+if (file_exists('/usr/local/vesta/web/inc/nginx_proxy')==true) {
+    if (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI']=="/") {
+        header("Location: /webmail/");
+        exit;
+    }
 }
 
 $login_url_skip=0;