[TYPO3-english] realurl configuration for different multilanguage domains

jean-sebastien_gervais at ssss.gouv.qc.ca jean-sebastien_gervais at ssss.gouv.qc.ca
Tue Apr 23 15:43:57 CEST 2013


Hello Michaela,

Think of realurl configuration as a big default array for both domain, 
then add specific configurations for rootpage id's for each domain1 and 
domain2 as well as /en and /gr  prevar 

Here's a few helpful links that will help you understand how realurl works 
 (part 2 is what you need)
http://www.dmitry-dulepov.com/2008/05/realurl-made-easy-part-1.html
http://www.dmitry-dulepov.com/2008/06/realurl-made-easy-part-2.html

And here's more specifics about mapping a language to a domain 
http://www.dmitry-dulepov.com/2009/02/realurl-separate-language-domains-in.html

Thanks to Dmitry !

Jean-Sebastien Gervais

typo3-english-bounces at lists.typo3.org a écrit sur 2013-04-23 01:18:35 :

> De : Michaela <m.herzhauser at gmx.de>
> A : typo3-english at lists.typo3.org
> Date : 2013-04-23 01:20
> Objet : [TYPO3-english]  realurl configuration for different 
> multilanguage domains
> Envoyé par : typo3-english-bounces at lists.typo3.org
> 
> Hello,
> 
> I have several domains that handle differently their languages.
> 
> Domain1 is available in .de, .com, .gr.
> The user's domain zone (top-level-domain) should be switched 
> according to the language.
> Rootpage ID is 1.
> 
> Domain2 is only available in .com 
> By changing the language there should be added "/en" or "/gr"
> Rootpage ID is 143.
> 
> All languages in the installation use onepagetree. But domain1 and 
> domain2 have of course different rootpage-IDs.
> 
> Each single language switch configuration for Domain1 or for Domain2
> does work but I don't know how to comine both configurations in one 
> realurl_conf.
> 
> The realurl_conf looks like this:
> 
> 
> <?php 
> $RootPID = array(
> 'www.domain1.de' => '1',
> 'www.domain1.com' => '1',
> 'www.domain1.gr' => '1',
> 'www.domain2.com' => '143',
> );
> 
> $TYPO3_CONF_VARS'['EXTCONF']['realurl']['_DOMAINS']' = array( 
>          'encode' => array( 
>                  array( 
>                          'GETvar' => 'L', 
>                          'value' => '0', 
>                          'useConfiguration' => '_DEFAULT', 
>                          'urlPrepend' => 'http://www.domain1.de'
>                  ), 
>                  array( 
>                          'GETvar' => 'L', 
>                          'value' => '1', 
>                          'useConfiguration' => '_DEFAULT', 
>                          'urlPrepend' => 'http://www.domain1.com'
>                  ), 
>                  array( 
>                          'GETvar' => 'L', 
>                          'value' => '2', 
>                          'useConfiguration' => '_DEFAULT', 
>                          'urlPrepend' => 'http://www.domain1.gr'
>                  ), 
>          ), 
>          'decode' => array( 
>                  'www.domain1.de' => array( 
>                          'GETvars' => array( 
>                                  'L' => '0', 
>                          ), 
>                          'useConfiguration' => '_DEFAULT' 
>                  ), 
>                  'www.domain1.com' => array( 
>                          'GETvars' => array( 
>                                  'L' => '1', 
>                          ), 
>                          'useConfiguration' => '_DEFAULT' 
>                  ), 
>                  'www.domain1.gr' => array( 
>                          'GETvars' => array( 
>                                  'L' => '2', 
>                          ), 
>                          'useConfiguration' => '_DEFAULT' 
>                  ), 
>          ), 
> ); 
> 
> $TYPO3_CONF_VARS '['EXTCONF']['realurl']['_DEFAULT']' = array( 
>          'init' => array( 
>              'enableCHashCache' => '1', 
>              'appendMissingSlash' => 'ifNotFile,redirect', 
>              'adminJumpToBackend' => '1', 
>              'enableUrlDecodeCache' => '1', 
>              'enableUrlEncodeCache' => '1', 
>              'emptyUrlReturnValue' => '/', 
>              'respectSimulateStaticURLs' => '1', 
>              'disableErrorLog' => '1', 
>          ), 
>          'pagePath' => array( 
>                   'type' => 'user',
>                   'userFunc' => 'EXT:realurl/
> class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
>                   'spaceCharacter' => '-',
>                   'languageGetVar' => 'L',
>                   'expireDays' => 7,
>                   'firstHitPathCache' => 1, 
>               'rootpage_id' => $RootPID[$_SERVER['HTTP_HOST']], 
>          ), 
>           'fileName' => array(
>                ...........
>           ),
>          'preVars' => array( 
>              '0' => array( 
>                  'GETvar' => 'L', 
>                  'valueMap' => array( 
>                      'gr' => '2', 
>                      'en' => '1', 
>                  ), 
>                  'noMatch' => 'bypass', 
>              ), 
>          ), 
>            'postVarSets' => array(
>                 '_DEFAULT' => array(
>              ........... 
>               ),
>            ),
> ); 
> ?>
> 
> How can I specify that the _DOMAIN configuration is only valid for 
domain1?
> 
> Thanks for any help.
> 
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list