将Typo3中的域与realurl链接

时间:2015-04-08 14:59:32

标签: typo3 typoscript typo3-6.2.x realurl

在我们的团队中,我们有一个包含~20个域的多语言,多域Typo3(6.2)安装。域的realurl配置正在运行。我的问题是,如果我想在域名之间进行链接,我只会获得http://www.domainA.com/?id=PAGEID的链接,而不是说网址。

页面树如下所示:

root
  domainA
    page1  
  domainB
    page2
  ...

现在我想要第2页到第1页的链接。

这是realurl_conf.php:

$languageMapping = array(
  'en' => '0',
  'de' => '1',
  'fr' => '2',
  ...
);
$liveDomains = array(
  "domainA.com" => "1",
  "domainA.de" => "1",
  "domainB.fr" => "2",
  ...
);

$liveDefault = array (
  'init' =>
  array (
    'enableCHashCache' => true,
    'appendMissingSlash' => 'ifNotFile,redirect[301]',
    'adminJumpToBackend' => true,
    'enableUrlDecodeCache' => true,
    'enableUrlEncodeCache' => true,
    'emptyUrlReturnValue' => '/',
  ),
  'pagePath' =>
  array (
    'type' => 'user',
    'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
    'spaceCharacter' => '-',
    'languageGetVar' => 'L',
    'rootpage_id' => '1',
  ),
  'fileName' =>
  array (
    'defaultToHTMLsuffixOnPrev' => 0,
    'acceptHTMLsuffix' => 1,
    'index' =>
    array (
      'print' =>
      array (
        'keyValues' =>
        array (
          'type' => 98,
        ),
      ),
    ),
  ),
  'preVars' =>
  array (
    0 =>
    array (
      'GETvar' => 'L',
      'valueMap' => $languageMapping,
      'noMatch' => 'bypass',
    ),
  ),
  "postVarSets" =>
  array (
    "_DEFAULT" =>
    array (
      "model" =>
      array (
        array (
          "GETvar" => "model"
        )
      ),
      "modelName" =>
      array (
        array (
          "GETvar" => "modelName"
        )
      ),
    ),
  ),
);
foreach ($liveDomains as $domain => $rootpage_id) {
  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.'.$domain] = $liveDefault;
  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.'.$domain]["pagePath"]["rootpage_id"] = $rootpage_id;
  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain] = "www.".$domain;
}

在TS中config.typolinkEnableLinksAcrossDomains = 1已启用。

0 个答案:

没有答案