-header("Vary: Accept");
-if(stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) {
- $content_type = 'application/xhtml+xml; charset=utf-8';
-} else {
- $content_type = 'text/html; charset=utf-8';
+header('Content-Type: text/html; charset=utf-8');
+header('x-ua-compatible: ie=edge');
+
+$protocol = (bool)is_ssl() ? 'https' : 'http';
+
+if ( !empty($cfg['web_root']) ) {
+ $cfg['web_root'] = preg_replace('#https?://#', $protocol . '://', $cfg['web_root'], 1);