-if (stristr ($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml'))
- $content_type = 'application/xhtml+xml; charset=utf-8';
-
-header('Content-Type: ' . $content_type);
+if ( !empty($cfg['web_root']) ) {
+ $cfg['web_root'] = preg_replace('#https?://#', $protocol . '://', $cfg['web_root'], 1);
+}