[TYPO3] RealUrl, multidomain, multilanguage, single tree setup 2

Tomi Hrovatin tomi at tri-ex.si
Fri Nov 30 15:24:09 CET 2007


Hi again,
few months have passed since my last attempt to configure realUrl on
multidomain/multilanguage/single tree setup.

Today I tried new version of realUrl 1.2.1. Unfortunately
without luck (I tried autoconfiguration too).
Please if somebody can tell me if this is even possible?
Of course a solution to the problem would be greatly appreciated.

The problem:
Rewriting for default domain (www.eksotika.si) works perfectly.
The problem is in alternative language - english 
(www.rare-exotic-plants.com). When english default page opens, all links 
on page are using slovene (default) language. ie: 
www.rare-exotic-plants.com/za-zbiratelje.html and after clicking the 
link, the page shown is still english homepage.
All subsequent pages have (almost) correct link ie:
http://www.rare-exotic-plants.com/en/collectors-plants.html
What I'd like to achieve is to have link like this:
http://www.rare-exotic-plants.com/collectors-plants.html

I wrote the domains so you can test it yourself! I will leave realurl 
active until monday 30.11. (On english page, only menus are translated!)

It seems that realurl NEEDS the first segment to switch to alternative 
language.
If you try http://www.rare-exotic-plants.com/en , english homepage shows 
like it should.

And another thing I noticed with current setup (details are written at 
the bottom of post): It really matters how I start to browse the pages 
after clearing the cache (by that I mean manually truncate the realurl 
tables and clearing fe cache).
The URLs are different if I start browsing slovene site and then browse 
english site (current behavior) or I browse english site and then 
slovene (nothing works).

So, that's it. I hope I didn't wrote too much :).
Thanks in advance, below is my config.

Tomi Hrovatin


Here's my:
# TS for languages

config.linkVars = L
config.uniqueLinkVars = 1

[globalString = IENV:HTTP_HOST = *eksotika.si]
config {
   language=si
   sys_language_uid = 0
   locale_all = sl_SI
}
[end]
[globalString = IENV:HTTP_HOST = *rare-exotic-plants.com]
config {
   language=en
   sys_language_uid = 1
   locale_all = en_US
}
[end]
[global]

here's my realurl setup:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.eksotika.si'] = array(
     'init' => array (
         'enableCHashCache' => 1,
         'appendMissingSlash' => 'ifNotFile',
		  'rootPageID' =>  2,
         'enableUrlDecodeCache' => true,
         'enableUrlEncodeCache' => true,
			'emptyUrlReturnValue' => true,
     ),
     'redirects' => array (
     ),
     'pagePath' => array (
         'type' => 'user',
         'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
         'spaceCharacter' => '-',
         'languageGetVar' => 'L',
         'expireDays' => 3,
         'rootpage_id' => 2,
     ),
     'fixedPostVars' => array(),
     'postVarSets' => array(
	 ...
	 ),
        'fileName' => array (
		 	...
         ),
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.rare-exotic-plants.com'] = 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.eksotika.si'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.rare-exotic-plants.com']['preVars'] 
= array (
				array (
				  'GETvar' => 'L',
                'valueDefault' => '1',
				  'valueMap' =>
				  array (
					 'en' => '1',
				  ),
				),
);



********************************************************************************
and now the great voodoo:
I just cleared cache. Everything started to behave strange. The urls for 
default page were like www.eksotika.si/1/za-zbiratelje.html (note /1/ 
which should stand for english page - well, sometimes). Then, after few 
retries (clearing/browsing) I managed to get the urls almost like 
described above. (after clearing the cache I first had to browse the 
slovenian pages (default) and only then english page.)
The difference was in english urls:
First hit: www.rare-exotic-plants.com
Second hit ie: click on 'Collector's plants': 
www.rare-exotic-plants.com/1/za-zbiratelje.html
Third hit ie: click on 'Collector's plants': 
www.rare-exotic-plants.com/en/collectors-plants.html.
As I can see now, this behavior happened only once. Immediately after 
clearing the cache. Now everything works like described above.

Uuauu... this is a long post. :)


More information about the TYPO3-english mailing list