tbrehm
2012-06-05 5b92a4d48d7faab163c089120047a4bd3332180f
- Fixed: FS#2225 - webdav access not working when redirect is used to select website base directory
- Improved https detection in get_ispconfig_url() function.
2 files modified
3 ■■■■ changed files
interface/lib/classes/functions.inc.php 2 ●●● patch | view | raw | blame | history
server/conf/vhost.conf.master 1 ●●●● patch | view | raw | blame | history
interface/lib/classes/functions.inc.php
@@ -101,7 +101,7 @@
    }
    
    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'];
server/conf/vhost.conf.master
@@ -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>