首页 文章

在clearCache之后的链接中Typo3 realurl错误的defaultValue

提问于
浏览
1

我正在运行Typo3 4.5.12和realurl扩展版本1.11.1 . 我的网站有3种语言de,en,ch,默认语言是德语,德语 .

如果我清除了realurl的缓存并首先调用www.example.com/site就可以了 .

但是,如果我首先在clearCache之后调用例如带有语言参数的网址,例如www.example.com/en/site,然后在www.example.com/site之后,所有链接都会获得../en/ .. -tag如www.example.com/en/site2 .

当我使用../ch/ ..或../de/在clearCache之后首先调用时,它是一样的 .

当我在链接中调用www.example.com/site时,他为什么不选择默认语言?

我的realurl配置:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    init' => array(
        'enableCHashCache' => 1,
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => 1,
        'enableUrlEncodeCache' => 1,
        'respectSimulateStaticURLs' => 0,
    ),
    'redirects_regex' => array (
    ),
    'preVars' => array(
        array(
            'GETvar' => 'no_cache',
            'valueMap' => array('no_cache' => 1),
            'noMatch' => 'bypass',
        ),
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                'de' => '0',
                'en' => '1',
                'cn' => '2',
            ),
            'defaultValue' => 'de',
            'noMatch' => 'bypass',
        ),
    ),
...

我的页面配置:

simulateStaticDocuments = 0
tx_realurl_enable = 1
prefixLocalAnchors = all

linkVars = mobile(off),L
uniqueLinkVars = 1

sys_language_uid = 0
language = de
locale_all = de_DE.UTF-8

sys_language_mode = content_fallback
sys_language_overlay = 1

1 回答

  • 1
    [...]
    'defaultValue' => 'de',
    'noMatch' => 'bypass',
    [...]
    

    有点反对字典 .

    拿出 noMatch ,这将创建网址:

    /site1 (german)
    /en/site1 (english)
    /cn/site1 (chinese)
    

    否则就去吧

    'noMatch' => 'de' //(without `'defaultValue' => 'de'`)
    

    要得到

    /de/site1 (german)
    /en/site1 (english)
    /cn/site1 (chinese)
    

相关问题