From 5b92a4d48d7faab163c089120047a4bd3332180f Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 5 Jun 2012 07:55:54 +0000 Subject: [PATCH] - Fixed: FS#2225 - webdav access not working when redirect is used to select website base directory - Improved https detection in get_ispconfig_url() function. --- interface/lib/classes/functions.inc.php | 2 +- server/conf/vhost.conf.master | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index b744e3568..7f4f31ca8 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -101,7 +101,7 @@ class functions { } public function get_ispconfig_url() { - $url = (stristr($_SERVER['SERVER_PROTOCOL'],'HTTPS'))?'https':'http'; + $url = (stristr($_SERVER['SERVER_PROTOCOL'],'HTTPS') || stristr($_SERVER['HTTPS'],'on'))?'https':'http'; $url .= '://'.$_SERVER['SERVER_NAME']; if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) { $url .= ':'.$_SERVER['SERVER_PORT']; diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 77bbb9d04..ee31e5a3a 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -223,6 +223,7 @@ RewriteCond %{HTTP_HOST} $ [NC] + RewriteCond %{REQUEST_URI} !^/webdav/ RewriteRule ^/(.*)$ $1 -- GitLab