- Fixed: FS#2225 - webdav access not working when redirect is used to select website base directory
- Improved https detection in get_ispconfig_url() function.
| | |
| | | } |
| | | |
| | | 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']; |
| | |
| | | </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> |