[TYPO3-english] RealURL + multilanguage + domain records -> can it be done?
Bas Hoonhout
bas at zestienkwadraat.nl
Thu Jun 18 15:31:19 CEST 2009
Hello all,
It is possible to define different domains for different branches of the
pagetree using domain records.
It is also possible to define a separate domain for each language using
RealURL's _DOMAINS configuration.
Is it also possible to use both at the same time?
---
The problem is that i don't know how to make the _DOMAINS -> encode ->
urlPrepend dependent on the location in the pagetree or the current domain.
I've got it kind of working by defining all domains with their corresponding
rootpage_id and for each domain a redirect_regexp that converts the preVar L
into the language-specific domain corresponding to the current domain or
location in the pagetree. Due to the continuous redirecting, POST variables
get lost and thus forms are not working... :(
My current config (relevant part):
$preVars = array( array( 'GETvar' => 'L', 'valueMap' => array( 'nl' => 0,
'en' => 1, ), 'noMatch' => 'bypass', ), );
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array( 'www.domain1.nl'
=> array( 'init' => array( 'enableUrlDecodeCache' => 0,
'enableUrlEncodeHash' => 0, ), 'redirects_regex' => array( '^nl/(.*)' => '
http://www.domain1.nl/\1', '^en/(.*)' => 'http://www.domain1.com/\1', ),
'preVars' => $preVars, 'pagePath' => array( 'type' => 'user', 'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'rootpage_id' => 1, 'languageGetVar' => 'L', ), 'postVarSets' =>
$postVarSets, 'fileName' => $fileNames, ), 'www.domain1.com' => '
www.domain1.nl',
'www.domain2.nl' => array( 'init' => array( 'enableUrlDecodeCache' => 0,
'enableUrlEncodeHash' => 0, ), 'redirects_regex' => array( '^nl/(.*)' => '
http://www.domain2.nl/\1', '^en/(.*)' => 'http://www.domain2.com/\1', ),
'preVars' => $preVars, 'pagePath' => array( 'type' => 'user', 'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'rootpage_id' => 2, 'languageGetVar' => 'L', ), 'postVarSets' =>
$postVarSets, 'fileName' => $fileNames, ),
'www.domain2.com' => 'www.domain2.nl',
'_DOMAINS' => array( 'decode' => array( '/\.nl$/' => array( 'GETvars' =>
array( 'L' => 0, ), ), '/\.com$/' => array( 'GETvars' => array( 'L' => 1, ),
), ), ), );
Best regards,
Bas Hoonhout
More information about the TYPO3-english
mailing list