[TYPO3-english] realurl multi domain - multi languages with subdomains
Sebastian Schöberl
dajak at gmx.net
Tue Jan 31 10:38:26 CET 2012
Hi,
thanks for your fast reply!
On Jan 30, 2012, at 11:03 AM, Dmitry Dulepov wrote:
> Hi!
>
> Sebastian Schöberl wrote:
>>
>>
>> But I should use the following domains:
>>
>> www.domain-german.de and www.domain-english.com for Homepage(1), Informations(50), Company(200) and Projects(300)
>>
>> reisen.domain-german.de and travel.domain-english.com for travel(2)
>
> Sorry, nested domains never worked well, neither they will. Move each domain to the root level. If you need parts of one domain inside another domain, use mount points or shortcuts (better for seo).
OK moving the different domains to the root-level should be possible. But as far as i understand, my main problem persists, as realur seems to use the very first domain configured for a given language (GETVar L) in the encode array to select the domain-prefix for links.
Consider following structure:
>> |-- travel (UID 2)
>> | |-- pages ...
>> |
>> |-- informations (UID 50)
>> | |-- pages ...
>> |
>> |-- Company (200)
>> | |-- pages ...
>> |
>> |-- Projects (300)
>> | |-- pages ...
[.....]
reisen.domain-german.de and travel.domain-english.com for travel(2)
info.domain-german.de and info.domain-english.com for Information (50)
company.domain-german.de and company.domain-english.com for Image company(200)
[.....]
Using a configuration like
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DOMAINS'] = array(
'encode' => array(
array(
'GETvar' => 'L',
'value' => '1',
'useConfiguration' => 'reisen.domain-german.de',
'urlPrepend' => 'http://reisen.domain-german.de'
),
[.....]
ALL german language links, from whatever domain are prefixed with reisen.domain-german.de instead of the corresponding german domain name for the given tree. Decoding works perfectly fine because its based on the domain-name.
As far as I understand the issue, the encoding is just based on the GETVar and NOT on the rootpage_id, causing the first given domain for a language to be used.
As I wrote before, I could solve the issue patching tx_realurl->adjustConfigurationByHostEncode() to take the rootpage_id of the given use_configuration into account [1]. My question is if there exists another posibility to get it work without changing the default behaviour of realURL?
Best regards,
Sebastian
[1] applied change
----- line 2301 -------
if (!isset($disposal['ifDifferentToCurrent']) || $disposal['value'] != $currentValue) {
if (isset($disposal['useConfiguration'])) {
$extConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'];
$sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
$rootLine = $sys_page->getRootLine($params['args']['page']['uid']);
$rootLine_uids = array();
foreach($rootLine as $entry) {
$rootLine_uids[] = $entry['uid'];
}
if( !in_array($extConf[$disposal['useConfiguration']]['pagePath']['rootpage_id'], $rootLine_uids)){ continue;
}
----------------
More information about the TYPO3-english
mailing list