0
votes

We have multiple pagetrees for each region (e.g. Germany, Suisse). The pages themselves are translated to several languages (e.g. de, en) using the L-Parameter.

Now Realurl should match from 2 url segments to the approriate page tree and language. I know how this can be done with separate domains for each region using the _Domains feature. But in this case the domain stays always the same for all regions. Can this be achieved with Realurl and how?

http://example.com/de/de => should map to pagetree with rootpage_id 1 and language de (L=0)

http://example.com/de/en => should map to pagetree with rootpage_id 1 and language en (L=1)

http://example.com/ch/de => should map to pagetree with rootpage_id 2 and language de (L=0)

http://example.com/ch/en => should map to pagetree with rootpage_id 2 and language en (L=1)

real_url.conf

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array(
        'enableCHashCache' => 1,
        'appendMissingSlash' => 'ifNotFile,redirect',
        'adminJumpToBackend' => 1,
        'enableUrlDecodeCache' => 1,
        'enableUrlEncodeCache' => 1,
        'emptyUrlReturnValue' => '/'
    ),
    'pagePath' => array(
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => '3',
        'rootpage_id' => 1,
        'firstHitPathCache'=>1
    ),
    'preVars' => array(
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                'de' => '0',
                'en' => '1',
            ),
            'valueDefault' => 'de',
        ),
       array(
            'GETvar' => 'no_cache',
            'valueMap' => array(
                'no_cache' => 1,
            ),
            'noMatch' => 'bypass',
        ),
    ),
);
1
Add your realconf.php configuration language code here..Pravin Vavadiya
I have just the basic realurl_conf as I did not find a way so far how to further proceed with the mentioned specification. Everthing I researched so far does not fullfill the requirements. So far I believe it is not possible with realurl anyway. Am I wrong?griesi
added realurl_confgriesi
the solution I am looking for is the first segment after the domain. There should be a segment which indicates which pagetree (region) to use. I know it can be done with _DOMAINS if each region (pagetree) has a separate domain. In our case all regions have the same domain and the switch should be done by the first segment after the domain. For that I did not find a similar solution to domains.griesi
We will turn it around now - de/de or de/ch. First comes the language and then the region. We will then have one page tree for the domain which splits up in two trees below the root. The top pages path segment will be named according to the region, e.g. de/chgriesi

1 Answers

0
votes

Now Realurl should match from 2 url segments to the approriate page tree and language.

RealURL cannot do that. Root page id is determined before segments are processed. It is defined by the domain record or your RealURL configuration.