[TYPO3-UG Italy] realurl multidomain lingue crossover url

David Denicolò | InteRa srl - graphi David Denicolò | InteRa srl - graphi
Thu May 19 15:18:20 CEST 2011


ciao ecco un paio di configurazioni:

--------- TS ---------

# default
config {
   baseURL = http://www.pippo.it/
   sys_language_uid = 0
   language = it
   locale_all = it_IT.UTF8
   htmlTag_langKey= it_IT
}

# Italiano
[globalVar = GP:L = 0]
config {
   baseURL = http://www.pippo.it/
   sys_language_uid = 0
   language = it
   locale_all = it_IT.UTF8
   htmlTag_langKey= it_IT
}
[global]

[globalString = IENV:HTTP_HOST = *pippo.it]
config {
   baseURL = http://www.pippo.it/
   sys_language_uid = 0
   language = it
   locale_all = it_IT.UTF8
   htmlTag_langKey= it_IT
}
[global]

# English
[globalVar = GP:L = 1]
config {
   baseURL=http://www.goofy.com/
   sys_language_uid = 1
   language = en
   locale_all = en_US.UTF-8
   htmlTag_langKey= en_EN
}
[global]

[globalString = IENV:HTTP_HOST = *goofy.com]
config {
   baseURL=http://www.goofy.com/
   sys_language_uid = 1
   language = en
   locale_all = en_US.UTF-8
   htmlTag_langKey= en_EN
}
[global]

---------------- REALURL CONF ---------------------
...

if ( true ) {
	$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.goofy.com'] = 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
	$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.pippo.it'] = 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
	
}

// edit for multiple languages
if ( true) {
	$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DOMAINS'] = array(
		'encode' => array(
			// Italiano
			array(
				'GETvar' => 'L',
				'value' => '0',
				'useConfiguration' => 'www.pippo.it',
				'urlPrepend' => 'http://www.pippo.it'
			),
			// English
			array(
				'GETvar' => 'L',
				'value' => '1',
				'useConfiguration' => 'www.goofy.com',
				'urlPrepend' => 'http://www.goofy.com'
			),
		),
		'decode' => array(
			// Italiano
			'www.pippo.it' => array(
				'GETvars' => array(
					'L' => '0',
				),
				'useConfiguration' => 'www.pippo.it'
			),
			// English
			'www.goofy.com' => array(
				'GETvars' => array(
					'L' => '1',
				),
				'useConfiguration' => 'www.goofy.com'
			),
		)
	);
}

> Ciao David!
> per riuscire a suggerire una risposta servirebbe vedere la parte di
> configurazione che gestisce questo comportamento.
> Immagino tu abbia messo in typoscript una condition che verifica il dominio
> di ingresso e forzi la lingua. In questo modo se arriva
> www.pippo.it/company.html la condizione risconosce il dominio it e imposta
> la lingua ad italiano, ignorando il parametro L, che ad esempio, potrebbe
> essere valorizzato alla lingua inglese.
>
> Suggerimeto potrebbe essere quello di fare la tua verifica solo se si sta
> cercando di visualizzare la home page;
> oppure in maniera piu' avanzata verificare se il parametro L (restituito da
> realurl immagino) e il dominio richiesto coincidono, in caso non coincidano
> forzare un 301 al dominio corretto e relativa pagina
>
> Non ho avuto il tempo di verificare come mettere in pratica quanto scritto,
> spero almeno di essermi spiegato in modo chiaro.
>
> Ciao
> Roberto
>
>

-- 
David Denicolò
InteRa graphic web e-motion
Ravenna - Italy - www.intera.it
--
http://twitter.com/davdenic
http://it.linkedin.com/in/daviddenicolo
http://www.facebook.com/david.denicolo
http://www.flickr.com/photos/davdenic


More information about the TYPO3-UG-Italy mailing list