X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/blobdiff_plain/231fd60c3e8d8fb7c1ee582dcd42835ff97272ef..a4fbcc8423a2ac742a250b011007e834d7a9fc6d:/typo3/sysext/cms/tslib/class.tslib_content.php diff --git a/typo3/sysext/cms/tslib/class.tslib_content.php b/typo3/sysext/cms/tslib/class.tslib_content.php index 5c4281c15f6d..718f23d90c95 100644 --- a/typo3/sysext/cms/tslib/class.tslib_content.php +++ b/typo3/sysext/cms/tslib/class.tslib_content.php @@ -5847,17 +5847,17 @@ class tslib_cObj { if (isset($conf['forceAbsoluteUrl.']['scheme']) && $conf['forceAbsoluteUrl.']['scheme']) { $absoluteUrlScheme = $conf['forceAbsoluteUrl.']['scheme']; } elseif ($page['url_scheme'] > 0) { - $absoluteUrlScheme = ((int) $page['url_scheme'] === t3lib_utility_http::SCHEME_HTTP) ? 'http' : 'https'; + $absoluteUrlScheme = ((int)$page['url_scheme'] === t3lib_utility_http::SCHEME_HTTP) ? 'http' : 'https'; } // If no domain records are defined, use current domain: - if ($targetDomain === '' && $conf['forceAbsoluteUrl'] || - $absoluteUrlScheme !== parse_url(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), PHP_URL_SCHEME)) { + $currentUrlScheme = parse_url(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), PHP_URL_SCHEME); + if ($targetDomain === '' && ($conf['forceAbsoluteUrl'] || $absoluteUrlScheme !== $currentUrlScheme)) { $targetDomain = $currentDomain; } - // If go for an absolute link, add site_path if it's not taken care about by absRefPrefix - if (!$GLOBALS['TSFE']->config['config']['absRefPrefix'] && $targetDomain !== '') { + // If go for an absolute link, add site path if it's not taken care about by absRefPrefix + if (!$GLOBALS['TSFE']->config['config']['absRefPrefix'] && $targetDomain == $currentDomain) { $targetDomain = $currentDomain . rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_PATH'), '/'); } }