[TYPO3-english] RealURL config: multiple domains for both tree branch and language
Bas Hoonhout
bas at zestienkwadraat.nl
Mon Jun 15 22:32:20 CEST 2009
Hello,
I have a website with three tree branches. Each branch has it's own domain
name. The entire website is configured for two languages as well: Dutch and
English.
I configured RealURL for the three branches. Each part has it's own entry in
the array $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']. All those
entries are identical, except for the value of "pagePath->rootpage_id".
The "preVars"-array for all entries are configured as follows:
array(
array(
'GETvar' => 'L',
'valueMap' => array(
'nl' => 0,
'en' => 1,
),
'noMatch' => 'bypass',
),
),
So far, so good. Each branch has it's own domain which is extended by "nl/"
or "en/" depending on the selected language. The possible URL's are
therefore:
http://www.firstdomain.nl/nl/
http://www.firstdomain.nl/en/
http://www.seconddomain.nl/nl/
http://www.seconddomain.nl/en/
http://www.thirddomain.nl/nl/
http://www.thirddomain.nl/en/
Now I try to get rid of the "nl/" and "en/" extensions by using separate
domains for each English version of each branch. In other words, I want to
change the list above simply to the following list:
http://www.firstdomain.nl/
http://www.firstdomain.com/
http://www.seconddomain.nl/
http://www.seconddomain.com/
http://www.thirddomain.nl/
http://www.thirddomain.com/
To do this, I filled the "_DOMAINS" part of the RealURL configuration. The
"decode" part looks like this:
'decode' => array(
'firstdomain.nl' => array(
'GETvars' => array(
'L' => '0',
),
'useConfiguration' => 'firstdomain.nl',
),
'firstdomain.com' => array(
'GETvars' => array(
'L' => '1',
),
'useConfiguration' => 'firstdomain.nl',
),
'seconddomain.nl' => array(
'GETvars' => array(
'L' => '0',
),
'useConfiguration' => 'seconddomain.nl',
),
... etcetera, works quite well.
The "encode" part looks like this:
'encode' => array(
array(
'GETvar' => 'L',
'value' => '0',
'ifDifferentToCurrent' => true,
'useConfiguration' => 'firstdomain.nl',
'urlPrepend' => 'http://www.firstdomain.nl',
),
array(
'GETvar' => 'L',
'value' => '1',
'ifDifferentToCurrent' => true,
'useConfiguration' => 'firstdomain.nl',
'urlPrepend' => 'http://www.firstdomain.com',
),
),
Obviously this only works for the first domain. And worse: all links within
the other domains link towards the first domain as a consequence of this
part of the RealURL configuration. How can I discriminate between the
different domains in the "encode" part of the "_DOMAINS" configuration?
Thanks in advance.
Best regards,
Bas
More information about the TYPO3-english
mailing list