[TYPO3-english] RealUrl multilanguage with and without country PathSegments

Dmitry Dulepov dmitry.dulepov at gmail.com
Fri Sep 9 17:50:40 CEST 2011


Hi!

Basti Baumann wrote:
>> Don't use _DEFAULT for multidomain web sites. If you do, expect problems
>> sooner or later.
>
> OK, but I define before the rootpage-id:
> $http_host_realurl = $rootpage_id[preg_replace('!^(www\.)!', '',
> $_SERVER['HTTP_HOST'])];
> $rootpage_id = array(
> 'domain.de' => '2',
> 'domain.com' => '2',
> 'typo3.domain.de' => '2',
> 'domain.nl' => '2',
> );

This may work but you never know. What if your web site is accessible by IP 
address or by some test domain? Than you will have problems. With multiple 
domains _DEFAULT should not be used at all.

> Default ist german: #1
> config.linkVars = L
> # Standardsprache
> config.sys_language_uid = 1
> config.language = de
> config.locale_all = de_DE
>
> and then:
> [globalVar = GP:L = 0]
> config.sys_language_uid = 0
> config.language = en
> config.locale_all = english
> [global]

If L is not set, you will still have German active (because L will not be 
0). You may want to use regexps: [globalVar = GP:L = /^0?$/]. This should 
work for existing and non-existing L.

> # Deutsch, sys_language.uid = 1
> [globalVar = GP:L = 1]
> config.sys_language_uid = 1
> config.sys_language_mode = 1
> config.language = de
> config.locale_all = de_DE
> [global]

This is not needed because you already have it above. So for L=1 you have 
to identical declarations that just take space.

Final thing: do you use latest RealURL? I remember a problem with 
translated segments a couple of versions ago.

-- 
Dmitry "itoldyou" Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/



More information about the TYPO3-english mailing list