Commit 5b92a4d4 authored by tbrehm's avatar tbrehm

- Fixed: FS#2225 - webdav access not working when redirect is used to select website base directory

- Improved https detection in  get_ispconfig_url() function.
parent 5764f8ed
......@@ -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'];
......
......@@ -223,6 +223,7 @@
</tmpl_if>
<tmpl_loop name="redirects">
RewriteCond %{HTTP_HOST} <tmpl_var name='rewrite_domain'>$ [NC]
RewriteCond %{REQUEST_URI} !^/webdav/
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'>
</tmpl_loop>
</tmpl_if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment