2017-12-07 16 views
-1

:TYPO3 RealURL 언어 도메인 구성 우리는 sceneario 다음 한

웹 사이트는 3 도메인이 있습니다.

  • 기본 :

    • domain.de
    • domain.eu

  • domain.com.tr TYPO3는 다국어에 대한 설정과 언어에 대한 ID가 이미되어있다 (de) = 0
  • en = 1
  • tr = 2

누군가 적절한 RealURL 구성을 제공 할 수 있습니까?

+1

적어도 혼자서 문제를 해결하는 방법에 대한 노력을 해주시겠습니까? 구성을 수행 할 다른 사람에게 요청하는 것은 stackoverflow가하는 것이 아닙니다. –

답변

0

이 방법을 사용하면 다른 하위 도메인의 기본 구성을 무시하면됩니다.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
    'encodeSpURL_postProc' => array('user_encodeSpURL_postProc'), 
    'decodeSpURL_preProc' => array('user_decodeSpURL_preProc'), 
    '_DEFAULT' => array (
     'init' => array (
      'enableCHashCache' => '1', 
      'appendMissingSlash' => 'ifNotFile', 
      'enableUrlDecodeCache' => '1', 
      'enableUrlEncodeCache' => '1' 
     ), 
     'redirects' => array (
     ), 
     'preVars' => array (
      '0' => array (
       'GETvar' => 'no_cache', 
       'valueMap' => array (
        'nc' => '0' 
       ), 
       'noMatch' => 'bypass', 
      ), 
      '1' => array (
       'GETvar' => 'L', 
       'valueMap' => array (
        'de' => '0', 
        'en' => '1', 
        'tr' => '2' 
       ), 
       'noMatch' => 'bypass' 
      ), 
     ), 
     'pagePath' => array (
      'type' => 'user', 
      'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 
      'spaceCharacter' => '-', 
      'languageGetVar' => 'L', 
      'rootpage_id' => '1' 
     ), 
     'fixedPostVars' => array (
     ), 
     'postVarSets' => array (
      '_DEFAULT' => array (
       'archive' => array (
        '0' => array (
         'GETvar' => 'tx_ttnews[year]' 
        ), 
        '1' => array (
         'GETvar' => 'tx_ttnews[month]', 
         'valueMap' => array (
          'january' => '01', 
          'february' => '02', 
          'march' => '03', 
          'april' => '04', 
          'may' => '05', 
          'june' => '06', 
          'july' => '07', 
          'august' => '08', 
          'september' => '09', 
          'october' => '10', 
          'november' => '11', 
          'december' => '12' 
         ), 
        ), 
       ), 
       'page' => array (
        '0' => array (
         'GETvar' => 'tx_ttnews[pointer]' 
        ), 
       ), 
       'category' => array (
        '0' => array (
         'GETvar' => 'tx_ttnews[cat]', 
         'lookUpTable' => array (
          'table' => 'tt_news_cat', 
          'id_field' => 'uid', 
          'alias_field' => 'title', 
          'addWhereClause' => ' AND NOT deleted', 
          'useUniqueCache' => '1', 
          'useUniqueCache_conf' => array (
           'strtolower' => '1', 
           'spaceCharacter' => '-' 
          ), 
         ), 
        ), 
       ), 
       'article' => array (
        '0' => array (
         'GETvar' => 'tx_ttnews[tt_news]', 
         'lookUpTable' => array (
          'table' => 'tt_news', 
          'id_field' => 'uid', 
          'alias_field' => 'title', 
          'addWhereClause' => ' AND NOT deleted', 
          'useUniqueCache' => '1', 
          'useUniqueCache_conf' => array (
           'strtolower' => '1', 
           'spaceCharacter' => '-' 
          ), 
         ), 
        ), 
        '1' => array (
         'GETvar' => 'tx_ttnews[swords]' 
        ), 
       ),     
      ), 
     ), 
     'fileName' => array (
      #'defaultToHTMLsuffixOnPrev' => '.html', 
      #'acceptHTMLsuffix' => 1, 
      'index' => array (
       'rss.xml' => array (
        'keyValues' => array (
         'type' => '100' 
        ), 
       ), 
       'rss091.xml' => array (
        'keyValues' => array (
         'type' => '101' 
        ), 
       ), 
       'rdf.xml' => array (
        'keyValues' => array (
         'type' => '102' 
        ), 
       ), 
       'atom.xml' => array (
        'keyValues' => array (
         'type' => '103' 
        ), 
       ), 
       'sitemap.xml' => array (
        'keyValues' => array (
         'type' => '776' 
        ), 
       ),    
      ), 
     ), 
    ) 
); 
/* 
* All your other domain configuration goes here. Change your domain name  
* and domain root page id as per your need. 
* 
*/ 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain.de'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain.de']['pagePath']['rootpage_id'] = '41'; // Change your sub-domain root page id 

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain.eu'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain.eu']['pagePath']['rootpage_id'] = '51'; // Change your sub-domain root page id 

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain.com.tr'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['domain.com.tr']['pagePath']['rootpage_id'] = '61'; // Change your sub-domain root page id 

필요에 따라 코드를 변경하십시오. 희망이 당신을 도울 것입니다.

인사말!

0

팔로우 솔루션은 도메인으로 언어 감지한다 : 여러 도메인에 대한 realurl 구성 아래

<?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', 
     ] 
     ] 
    ]; 
0

사용.

<?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