[TYPO3-english] RealURL filename wildcards

Viktor Livakivskyi v-tyok at mail.ru
Fri Jul 27 15:10:39 CEST 2012


Hi, Graham.

> I have a lot of URLs of the form 
> http://my.domain.com/people/personal_name.html
>
> I can see that something like this:
>
> 'fileName' => array (
>      'index' => array(
>          '.html' => array(
>              'keyValues' => array (...
>
> will pick up the personal_name.html part. However, I only want the 
> behaviour in pages with URLs starting http://my.domain.com/people/
>
> Can I simply start with
>
> $TYPO3_CONF_VARS['EXTCONF']['realurl']['http://my.domain.com/people/'] = 
> array(... ?

For me it sounds like you have an extension, called, e.g. tx_people, which 
shows content, epending on some parameter tx_people_pi1[field]=personal_name
You put it on page, called "People" (e.g. id=4).
So you clean url is: /index.php?id=4&tx_people[field]=personal_name
RealURL makes this url: /people/personal_name.html
So, /people/ is treanslated to ?id=4 and personal_name.html to 
&tx_people[field]=personal_name
Then you just need to use very basic confuguration:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['domain.tld'] = array(
    'init' => array(
        'enableCHashCache' => true,
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => true,
        'enableUrlEncodeCache' => true,
        'emptyUrlReturnValue' => true,
        'emptySegmentValue' => '-'
    ),
    'fileName' => array (
        'defaultToHTMLsuffixOnPrev' => true,
    ),
    'pagePath' => array(
        'type' => 'user',
        'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'expireDays' => 3,
        'languageGetVar' => 'L',
        'rootpage_id' => 1,
        'disablePathCache' => false,
        'autoUpdatePathCache' => false
    ),
    'preVars' => array(
    ),
    'postVarSets' => array(
    ),
    'fixedPostVars' => array(
        '4' => array(
            array(
                'GETvar' => 'tx_people_pi1[field]',
                'autoUpdate' => true,
                )
            )
        )
    )
);
Is it correct?
Or you mean something else? 



More information about the TYPO3-english mailing list