postVarSet 中的多域 realurl 配置

Multidomain realurl configuration in postVarSet

我有一个使用8.7.22版本的TYPO3。这是一个多域网站,域如下所示:

website.com/domain1

website.com/domain2

website.com/domain3

website.com/domain4

每个域在TYPO3中都有一个单独的树,每个域都有不同的域记录。

现在,我正在尝试使 realurl 适用于我的所有域,但每次访问时都会出现此错误:

Page Not Found Reason:

Segment "domain1" was not a keyword for a postVarSet as expected on page with id=1.

老实说,我完全不知道如何在 postVarSet 部分定义域。这是我当前的 realurl 配置:

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array(
        'appendMissingSlash' => 'ifNotFile,redirect',
        'emptyUrlReturnValue' => '/',
    ),
    'pagePath' => array(
        'rootpage_id' => '1',
    ),
    'fileName' => array(
        'defaultToHTMLsuffixOnPrev' => 0,
        'acceptHTMLsuffix' => 1,
        'index' => array(
            'print' => array(
                'keyValues' => array(
                    'type' => 98,
                ),
            ),
        ),
    ),
);

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain1'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain2'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain2']['pagePath']['rootpage_id'] = '274';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain3'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain3']['pagePath']['rootpage_id'] = '256';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain4'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['website.com/domain4']['pagePath']['rootpage_id'] = '349';

有什么想法吗?

非常感谢

这是我解决问题的方法:

Page:id=0

|

|--Main root page (domain record = website.com)

|---- Root 1 (domain record = website.com/domain1)

|---- Root 2 (domain record = website.com/domain2)

|---- Root 3 (domain record = website.com/domain4)

|---- Root 4 (domain record = website.com/domain3)

在包括主根页面在内的所有根页面中,我勾选了"Use as Root Page"选项,并为新网站创建了一个模板。

最后,将此打字错误代码放入所有根中:

config.typolinkEnableLinksAcrossDomains = 1

config.absRefPrefix = /

config.tx_realurl_enable = 1