[TYPO3] Realurl more than one domain

Dmitry Dulepov typo3 at accio.lv
Thu Jun 8 12:40:01 CEST 2006


Hi!

Remco Zwaan wrote:
> I just playing around with real-url and I bounced on the problem of more
> than one domain attached to the page-tree. I just read in the manual
> that it is is possible to realize this ...but I don't now how to
> integrate this in my ext_localconf.php Can anyone help me with this?

I usually create a "template" for all sites with the same settings:

$realurl_config = array(
	'pagePath' => array(
             'type' => 'user',
             'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main'
         ),
	'preVars' => array(
		...............
	)
	// any other realurl configuration directives
);

Notice: no 'rootpage_id' in 'pagepath' section (because it is template!)

Than:

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
	'_DEFAULT' => $realurl_config,
	'www.mydomain.tld' => $realurl_config,
	'mydomain.tld' => 'www.mydomain.tld',
	'www.mydomain2.tld' => $realurl_config,
	'mydomain2.tld' => 'www.mydomain2.tld'
);

unset($realurl_config);

$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.mydomain.tld']['pagepath']['rootpage_id'] 
= 123;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.mydomain2.tld']['pagepath']['rootpage_id'] 
= 456;

All done. Compact and easy.

Dmitry.
-- 
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-english mailing list