Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (Revision 6965) +++ typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) @@ -6102,8 +6102,21 @@ } } + $absoluteUrlScheme = 'http'; + // URL shall be absolute: + if (isset($conf['forceAbsoluteUrl']) && $conf['forceAbsoluteUrl']) { + // If no domain records are defined, use current domain: + if ($targetDomain === '') { + $targetDomain = $currentDomain; + } + // Override scheme: + if (isset($conf['forceAbsoluteUrl.']['scheme']) && $conf['forceAbsoluteUrl.']['scheme']) { + $absoluteUrlScheme = $conf['forceAbsoluteUrl.']['scheme']; + } + } + // If target page has a different domain and the current domain's linking scheme (e.g. simulateStaticDocuments/RealURL/...) should not be used - if (strlen($targetDomain) && !$enableLinksAcrossDomains) { + if (strlen($targetDomain) && $targetDomain !== $currentDomain && !$enableLinksAcrossDomains) { $target = isset($conf['extTarget']) ? $conf['extTarget'] : $GLOBALS['TSFE']->extTarget; if ($conf['extTarget.']) { $target = $this->stdWrap($target, $conf['extTarget.']); @@ -6112,7 +6125,7 @@ $target = $forceTarget; } $LD['target'] = $target; - $this->lastTypoLinkUrl = $this->URLqMark('http://' . $targetDomain . '/index.php?id=' . $page['uid'], $addQueryParams) . $sectionMark; + $this->lastTypoLinkUrl = $this->URLqMark($absoluteUrlScheme . '://' . $targetDomain . '/index.php?id=' . $page['uid'], $addQueryParams) . $sectionMark; } else { // Internal link or current domain's linking scheme should be used if ($forceTarget) { $target = $forceTarget; @@ -6133,7 +6146,7 @@ } $urlParts = parse_url($LD['totalURL']); if ($urlParts['host'] == '') { - $LD['totalURL'] = 'http://' . $targetDomain . ($LD['totalURL']{0} == '/' ? '' : '/') . $LD['totalURL']; + $LD['totalURL'] = $absoluteUrlScheme . '://' . $targetDomain . ($LD['totalURL']{0} == '/' ? '' : '/') . $LD['totalURL']; } } $this->lastTypoLinkUrl = $this->URLqMark($LD['totalURL'],'').$sectionMark;