Index: t3lib/class.t3lib_userauth.php =================================================================== --- t3lib/class.t3lib_userauth.php (Revision 3198) +++ t3lib/class.t3lib_userauth.php (Arbeitskopie) @@ -556,6 +556,9 @@ $backendScript = t3lib_BEfunc::getBackendScript(); if($requestStr == $backendScript && t3lib_div::getIndpEnv('TYPO3_SSL')) { list(,$url) = explode('://',t3lib_div::getIndpEnv('TYPO3_SITE_URL'),2); + $sslPortSuffix = (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSLPort']) ? + ':'.intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSLPort']) : ''); + $url = str_replace($sslPortSuffix, '', $url); // strip port from url header('Location: http://'.$url.TYPO3_mainDir.$backendScript); exit; } Index: typo3/init.php =================================================================== --- typo3/init.php (Revision 3198) +++ typo3/init.php (Arbeitskopie) @@ -233,16 +233,21 @@ // Check SSL (https) // ********************** if (intval($TYPO3_CONF_VARS['BE']['lockSSL']) && !(defined('TYPO3_cliMode') && TYPO3_cliMode)) { + $sslPortSuffix = intval($TYPO3_CONF_VARS['BE']['lockSSLPort']) ? + ':'.intval($TYPO3_CONF_VARS['BE']['lockSSLPort']) : ''; if ($TYPO3_CONF_VARS['BE']['lockSSL'] == 3) { $requestStr = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT'), strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir)); if($requestStr == 'index.php' && !t3lib_div::getIndpEnv('TYPO3_SSL')) { list(,$url) = explode('://',t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),2); - header('Location: https://'.$url); + $address = substr($url, 0, strpos($url, '/')); + header('Location: https://'.$address.$sslPortSuffix.substr($url, strlen($address))); + exit; } } elseif (!t3lib_div::getIndpEnv('TYPO3_SSL') ) { if ($TYPO3_CONF_VARS['BE']['lockSSL'] == 2) { list(,$url) = explode('://',t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir,2); - header('Location: https://'.$url); // Just point us away from here... + $address = substr($url, 0, strpos($url, '/')); + header('Location: https://'.$address.$sslPortSuffix.substr($url, strlen($address))); } else { header('Status: 404 Not Found'); // Send Not Found header - if the webserver can make use of it... header('Location: http://'); // Just point us away from here...