我们有以下场景:
该网站有3个域名。
已经为多语言设置了TYPO3,语言的ID为:
有人能为我们提供适当的RealURL配置吗?
答案 0 :(得分:0)
试试这个,您只需要覆盖其他子域的默认配置。
scala> total = x
// <console>:13: error: type mismatch;
// found : List[Serializable]
// required: List[Test.type]
// total = x
// ^
请根据需要更改代码。希望这会对你有所帮助。
问候!
答案 1 :(得分:0)
Follow solution通过域进行语言检测:
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = [
'www.domain.de' => [ /* main configuration */,
'www.domain.eu' => 'www.domain.de',
'www.domain.tr' => 'www.domain.de',
'_DOMAINS' => [
'encode' => [
[
'GETvar' => 'L',
'value' => '0',
'useConfiguration' => 'www.domain.de',
'urlPrepend' => 'https://www.domain.de'
],
[
'GETvar' => 'L',
'value' => '1',
'useConfiguration' => 'www.domain.eu',
'urlPrepend' => 'https://www.domain.eu'
],
[
'GETvar' => 'L',
'value' => '2',
'useConfiguration' => 'www.domain.tr',
'urlPrepend' => 'https://www.domain.tr'
]
],
'decode' => [
'www.domain.de' => [
'GETvars' => [
'L' => '',
],
'useConfiguration' => 'www.domain.de',
],
'www.domain.eu' => [
'GETvars' => [
'L' => '1',
],
'useConfiguration' => 'www.domain.eu',
],
'www.domain.tr' => [
'GETvars' => [
'L' => '2',
],
'useConfiguration' => 'www.domain.tr',
]
]
];
答案 2 :(得分:0)
对多个域使用以下realurl配置。
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
'_DEFAULT' =>
array (
'init' =>
array (
'appendMissingSlash' => 'ifNotFile,redirect',
),
'pagePath' =>
array (
'rootpage_id' => '1',
),
'fixedPostVars' => array(
),
'fileName' =>
array (
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 1,
'index' =>
array (
'print' =>
array (
'keyValues' =>
array (
'type' => 98,
),
),
),
),
'preVars' =>
array (
0 =>
array (
'GETvar' => 'L',
'valueMap' =>
array (
'en' => '1',
'tr' => '2'
),
'noMatch' => 'bypass',
),
),
'postVarSets' =>array (
'_DEFAULT' =>array (
),
),
),
);
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['domain.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['domain.de'] ['pagePath'] ['rootpage_id'] = '1'; //Root Page Id
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['domain.eu'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['domain.eu'] ['pagePath'] ['rootpage_id'] = '169'; //Root Page Id
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['domain.com.tr'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['domain.com.tr'] ['pagePath'] ['rootpage_id'] = '386'; //Root Page Id