Index: typo3/sysext/cms/ext_tables.php
===================================================================
--- typo3/sysext/cms/ext_tables.php (Revision 8688)
+++ typo3/sysext/cms/ext_tables.php (Arbeitskopie)
@@ -143,6 +143,19 @@
'default' => '0'
)
),
+ 'urlScheme' => array (
+ 'exclude' => 1,
+ 'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.urlScheme',
+ 'config' => array (
+ 'type' => 'select',
+ 'items' => array (
+ array('LLL:EXT:cms/locallang_tca.xml:pages.urlScheme.I.0', '0'),
+ array('LLL:EXT:cms/locallang_tca.xml:pages.urlScheme.I.1', '1'),
+ array('LLL:EXT:cms/locallang_tca.xml:pages.urlScheme.I.2', '2')
+ ),
+ 'default' => '0'
+ )
+ ),
'fe_group' => array (
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group',
@@ -582,7 +595,7 @@
$TCA['pages']['palettes'] = t3lib_div::array_merge($TCA['pages']['palettes'],array(
'1' => array('showitem' => 'starttime, endtime, extendToSubpages'),
'2' => array('showitem' => 'layout, lastUpdated, newUntil, no_search'),
- '3' => array('showitem' => 'alias, target, no_cache, cache_timeout'),
+ '3' => array('showitem' => 'alias, target, no_cache, cache_timeout, urlScheme'),
'5' => array('showitem' => 'author, author_email', 'canNotCollapse' => 1)
));
Index: typo3/sysext/cms/locallang_tca.xml
===================================================================
--- typo3/sysext/cms/locallang_tca.xml (Revision 8688)
+++ typo3/sysext/cms/locallang_tca.xml (Arbeitskopie)
@@ -22,6 +22,10 @@
+
+
+
+
Index: typo3/sysext/cms/ext_tables.sql
===================================================================
--- typo3/sysext/cms/ext_tables.sql (Revision 8688)
+++ typo3/sysext/cms/ext_tables.sql (Arbeitskopie)
@@ -452,6 +452,7 @@
fe_group varchar(100) DEFAULT '0' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
layout tinyint(3) unsigned DEFAULT '0' NOT NULL,
+ urlScheme tinyint(3) unsigned DEFAULT '0' NOT NULL,
target varchar(80) DEFAULT '' NOT NULL,
media text,
lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
Index: typo3/sysext/cms/tslib/class.tslib_fe.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_fe.php (Revision 8688)
+++ typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
@@ -982,6 +982,18 @@
$this->pageNotFoundAndExit($pNotFoundMsg[$this->pageNotFound]);
}
+ if ($this->page['urlScheme'] > 0) {
+ $newUrl = '';
+ if ($this->page['urlScheme'] == 1 && substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 0, 5) == 'https') {
+ $newUrl = 'http' . substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 5);
+ }
+ if ($this->page['urlScheme'] == 2 && substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 0, 4) == 'http') {
+ $newUrl = 'https' . substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 4);
+ }
+ if ($newUrl !== '') {
+ t3lib_utility_http::redirect($newUrl, t3lib_utility_http::HTTP_STATUS_301);
+ }
+ }
// set no_cache if set
if ($this->page['no_cache']) {
$this->set_no_cache();
Index: typo3/sysext/cms/tslib/class.tslib_content.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_content.php (Revision 8688)
+++ typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
@@ -6165,7 +6165,7 @@
$absoluteUrlScheme = 'http';
// URL shall be absolute:
- if (isset($conf['forceAbsoluteUrl']) && $conf['forceAbsoluteUrl']) {
+ if (isset($conf['forceAbsoluteUrl']) && $conf['forceAbsoluteUrl'] || $page['urlScheme'] > 0) {
// If no domain records are defined, use current domain:
if ($targetDomain === '') {
$targetDomain = $currentDomain;
@@ -6173,6 +6173,8 @@
// Override scheme:
if (isset($conf['forceAbsoluteUrl.']['scheme']) && $conf['forceAbsoluteUrl.']['scheme']) {
$absoluteUrlScheme = $conf['forceAbsoluteUrl.']['scheme'];
+ } else if ($page['urlScheme'] > 0) {
+ $absoluteUrlScheme = $page['urlScheme'] == 1 ? 'http' : 'https';
}
}