Advertisement
Guest User

TYPO3 RealURL multi language multi domain setup

a guest
Mar 1st, 2011
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.90 KB | None | 0 0
  1. <?php
  2.  
  3. /***********************************************************************
  4. /TypoScript settings for multi-language multi-domain setup
  5. /**********************************************************************/
  6. /*
  7.  
  8. // Set desired language according to calling domain
  9. [globalVar = GP:L=0] OR [globalString = IENV:HTTP_HOST = de.domain.de]
  10. config {
  11.     sys_language_uid = 0
  12.     language = de
  13.     locale_all = de_DE
  14. }
  15. [global]
  16.  
  17. [globalVar = GP:L=3] OR [globalString = IENV:HTTP_HOST = en.domain.de]
  18. config {
  19.     sys_language_uid = 3
  20.     language = en
  21.     locale_all = en_EN
  22. }
  23. [global]
  24.  
  25. // Set desired baseURL according to calling domain
  26. [globalString = ENV:HTTP_HOST=de.domain.de]
  27.     config.baseURL = http://de.domain.de/
  28. [global]
  29.  
  30. [globalString = ENV:HTTP_HOST=en.domain.de]
  31.     config.baseURL = http://en.domain.de/
  32. [global]
  33. */
  34.  
  35. /***********************************************************************
  36. /RealURL settings for multi-language multi-domain setup
  37. /**********************************************************************/
  38.  
  39. $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
  40.     '_DEFAULT' => array(
  41.         'init' => array(
  42.             'enableCHashCache'          => 1,
  43.             'respectSimulateStaticURLs' => 1,
  44.             'enableUrlDecodeCache'      => 1,
  45.             'enableUrlEncodeCache'      => 1,
  46.             'appendMissingSlash'        => 'ifNotFile',
  47.             'postVarSet_failureMode'    => 'redirect_goodUpperDir'
  48.         ),
  49.  
  50.         'preVars' => array (
  51.             '0' => array (
  52.                 'GETvar' => 'no_cache',
  53.                 'valueMap' => array (
  54.                     'nc' => '1'
  55.                 ),
  56.                 'noMatch' => 'bypass'
  57.             ),
  58.             '1' => array (
  59.                 'GETvar' => 'L',
  60.                 'valueMap' => array (
  61.                     'de' => '0',
  62.                     'nl' => '1',
  63.                     'fr' => '2',
  64.                     'en' => '3'
  65.                 ),
  66.                 'valueDefault' => 'de',
  67.                 'noMatch' => 'bypass',
  68.             ),
  69.         ),
  70.  
  71.         'redirects' => array(),
  72.  
  73.         'pagePath' => array(
  74.                 'type'                  => 'user',
  75.                 'userFunc'      => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
  76.                 'rootpage_id'       => 2,
  77.                 'spaceCharacter'    => '-',
  78.                 'languageGetVar'    => 'L',
  79.                 'segTitleFieldList' => 'nav_title,title',
  80.                 'disablePathCache'      => 1,
  81.                 'excludePageIds'    => null,
  82.                 'expireDays' => '7'
  83.         ),
  84.  
  85.         'fixedPostVars' => array(),
  86.  
  87.         'postVarSets' => array(
  88.             '_DEFAULT' => array(
  89.  
  90.                 'browse' => array (
  91.                     '0' => array (
  92.                         'GETvar' => 'tx_ttnews[pointer]'
  93.                     ),
  94.                 ),
  95.  
  96.                 'aktuell' => array(
  97.                     '0' => array (
  98.                         'GETvar' => 'tx_ttnews[tt_news]',
  99.                         'lookUpTable' => array (
  100.                             'table' => 'tt_news',
  101.                             'id_field' => 'uid',
  102.                             'alias_field' => 'title',
  103.                             'addWhereClause' => ' AND NOT deleted',
  104.                             'useUniqueCache' => '1',
  105.                             'useUniqueCache_conf' => array (
  106.                             'strtolower' => '1',
  107.                             'spaceCharacter' => '-',
  108.                             ),
  109.                         ),
  110.                     ),
  111.                     '1' => array (
  112.                         'GETvar' => 'tx_ttnews[swords]',
  113.                     ),
  114.                     '2' => array (
  115.                         'GETvar' => 'tx_ttnews[backPid]',
  116.                     ),
  117.                 ),
  118.  
  119.                 'suche' => array(
  120.                     array(
  121.                         'GETvar' => 'tx_indexedsearch[ext]',
  122.                         'valueMap' => array(
  123.                             'einfach' => 0,
  124.                             'erweitert' => 1,
  125.                         ),
  126.                     ),
  127.                 ),
  128.  
  129.  
  130.                 'galerie' => array(
  131.                     array(
  132.                         'GETvar' => 'tx_chgallery_pi1[pointer]',
  133.                     ),
  134.                     array(
  135.                         'GETvar' => 'tx_chgallery_pi1[dirtitle]',
  136.                     ),
  137.                     array(
  138.                         'GETvar' => 'tx_chgallery_pi1[single]',
  139.                     ),
  140.                     array(
  141.                         'GETvar' => 'tx_chgallery_pi1[ceid]',
  142.                     ),
  143.                 ),
  144.  
  145.                 'account' => array(
  146.                     array(
  147.                         'GETvar' => 'tx_srfeuserregister_pi1[cmd]',
  148.                     ),
  149.                 ),
  150.             ),
  151.         ),
  152.  
  153.  
  154.         'filename' => array(
  155.             'index' => array(
  156.                 'rss-091.xml' => array(
  157.                     'keyValues' => array(
  158.                         'type' => '400',
  159.                     ),
  160.                 ),
  161.                 'rss-2.xml' => array(
  162.                     'keyValues' => array(
  163.                         'type' => '401',
  164.                     ),
  165.                 ),
  166.                 'rdf.xml' => array(
  167.                     'keyValues' => array(
  168.                         'type' => '402',
  169.                     ),
  170.                 ),
  171.                 'atom.xml' => array(
  172.                     'keyValues' => array(
  173.                         'type' => '403',
  174.                     ),
  175.                 ),
  176.                 'print.html' => array('keyValues' => array('type' => 98)),
  177.             ),
  178.         ),
  179.  
  180.     ),
  181.  
  182.     '_DOMAINS' => array(
  183.         'encode' => array(
  184.             array(
  185.                 'GETvar' => 'L',
  186.                 'value' => '0',
  187.                 'ifDifferentToCurrent' => true,
  188.                 'useConfiguration' => '_DEFAULT',
  189.                 'urlPrepend' => 'http://de.domain.de'
  190.             ),
  191.             array(
  192.                 'GETvar' => 'L',
  193.                 'value' => '3',
  194.                 'ifDifferentToCurrent' => true,
  195.                 'useConfiguration' => '_DEFAULT',
  196.                 'urlPrepend' => 'http://en.domain.de'
  197.             )
  198.         ),
  199.         'decode' => array(
  200.             'de.domain.de' => array(
  201.                 'GETvars' => array(
  202.                     'L' => '0',
  203.                 ),
  204.                 'useConfiguration' => '_DEFAULT'
  205.             ),
  206.             'en.domain.de' => array(
  207.                 'GETvars' => array(
  208.                     'L' => '3',
  209.                 ),
  210.             '   useConfiguration' => '_DEFAULT'
  211.             ),
  212.         ),
  213.     ),
  214.  
  215. );
  216.  
  217. $TYPO3_CONF_VARS['EXTCONF']['realurl']['de.domain.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
  218. $TYPO3_CONF_VARS['EXTCONF']['realurl']['en.domain.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
  219. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement