Realurl从页面标题生成页面URI。在多域环境中,碰巧有一些页面具有相同的标题,例如" contact"或"印记"。似乎realurl不能区分这些URL:
http://www.domain1.com/contact/ http://www.domain2.com/contact/
它们始终指向realurl数据库表中的第一个URL,在上面的示例中为" http://www.domain1.com/contact/"。有没有办法避免这种情况?
这是reaur配置:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array(
'_DEFAULT' => array(
'init' => array(
'appendMissingSlash' => 'ifNotFile,redirect',
'emptyUrlReturnValue' => '/',
),
'pagePath' => array(
'rootpage_id' => '123',
),
'fileName' => array(
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 1,
'index' => array(
'print' => array(
'keyValues' => array(
'type' => 98,
),
),
),
),
),
'www.domain1.de' => '_DEFAULT',
'domain1.de' => 'www.domain1.de',
'www.domain2.de' => '_DEFAULT',
'www.domain2.de' => array(
'pagePath' => array(
'rootpage_id' => '456',
),
),
'domain2.de' => 'www.domain2.de',
);
答案 0 :(得分:1)
通常,这意味着rootpage_id
设置不正确或未在您的配置中设置。当您正确配置根页面ID时,如果您对各个域具有相同的标题,则RealURL没有任何问题。
答案 1 :(得分:0)
这是正确的snytax:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
'init' => array(
'appendMissingSlash' => 'ifNotFile,redirect',
'emptyUrlReturnValue' => '/',
),
'pagePath' => array(
'rootpage_id' => '123',
),
'fileName' => array(
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 1,
'index' => array(
'print' => array(
'keyValues' => array(
'type' => 98,
),
),
),
),
);
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.domain1.tld'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain1.tld'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.domain1.tld'];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.domain2.tld'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.domain2.tld']['pagePath']['rootpage_id'] = '456';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain2.tld'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.domain2.tld'];
当前的realurl配置可以通过模块“Configuration”找到 - > $ GLOBALS [ 'TYPO3_CONF_VARS'。在那里可以检查realurl配置文件是否完成它应该做的事情。