如何删除 typo3 中带有 realurl 扩展名的重复斜线

how to remove duplicate slashes with realurl extension in typo3

我正在使用扩展名 realurl 来最小化我的 urls,我设法从 url 中删除了两个元素,就像这样:/blog/blog/artikel/news/detail/News/ 现在是这样 /blog/artikel/news///。 你可以看到最后有额外的斜线。 我想摆脱他们。 先感谢您 这是我真正的url 配置文件

<?php
/**
 *
 * dix_UrlTool default realurl configuration
 * based on realurl-configuration of news.typo3.org
 *  http://news.typo3.org/about/realurl-configuration/
 *
 */

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array ( 
    '_DEFAULT' => array (
        'init' => array (
            'enableCHashCache' => '1',
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => '1',
            'enableUrlEncodeCache' => '1',
            'emptyUrlReturnValue' => '/',
        ),
        'redirects' => array (
//          'de/aerzte.html' => '/?id=51&L=3',
        'support.html' => 'go/support-active'
        ),
        'preVars' => array (
            '0' => array (
                'GETvar' => 'no_cache',
                'valueMap' => array (
                    'nc' => '1',
                ),
                'noMatch' => 'bypass'
            ),
            '1' => array (
                'GETvar' => 'L',
                'valueMap' => array (
                    'de' => '3',
                    'en' => '0',
                    'fr' => '6',
//                    '_DEFAULT' => '0',
                ),
                'noMatch' => 'bypass',
            ),            
        ),
        'pagePath' => array (
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => '7',
            'rootpage_id' => 3,
        ),
        'fixedPostVars' => array (
        ),
        'postVarSets' => array (

            '_DEFAULT' => array (

        // EXT:news start
        'news' => array(
                array(
                        'GETvar' => 'tx_news_pi1[action]',
                ),
                array(
                        'GETvar' => 'tx_news_pi1[controller]',
                ),
                array(
                        'GETvar' => 'tx_news_pi1[news]',
                        'lookUpTable' => array(
                                'table' => 'tx_news_domain_model_news',
                                'id_field' => 'uid',
                                'alias_field' => 'title',
                                'addWhereClause' => ' AND NOT deleted',
                                'useUniqueCache' => 1,
                                'useUniqueCache_conf' => array(
                                        'strtolower' => 1,
                                        'spaceCharacter' => '-',
                                ),
                                'languageGetVar' => 'L',
                                'languageExceptionUids' => '',
                                'languageField' => 'sys_language_uid',
                                'transOrigPointerField' => 'l10n_parent',
                                'autoUpdate' => 1,
                                'expireDays' => 180,
                        ),
                ),
        ),
        // EXT:news end                


            ),
        ),
        'fileName' => array (
//
// if you don't want .html-URLs set the following to "false" (e.g. 'defaultToHTMLsuffixOnPrev' => false,)
// then you get http://www.yourdomain.com/imprint/ instead of http://www.yourdomain.com/imprint.html
//
            'defaultToHTMLsuffixOnPrev' => false,
            'index' => array (
                'rss.xml' => array (
                    'keyValues' => array (
                        'type' => '100',
                    ),
                ),
                'rss091.xml' => array (
                    'keyValues' => array (
                        'type' => '101',
                    ),
                ),
                'rdf.xml' => array (
                    'keyValues' => array (
                        'type' => '102',
                    ),
                ),
                'atom.xml' => array (
                    'keyValues' => array (
                        'type' => '103',
                    ),
                ),
            ),
        ),
    ),

); 


$domains = array(
    '_DEFAULT' => '3',
);
foreach ($domains as $domain=>$pid) {
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]['pagePath']['rootpage_id'] = $pid;
}
//$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.***.com']['pagePath']['rootpage_id'] = 3;
?> 

尝试将 'noMatch' => 'bypass' 添加到您的 postvarSets:

:
'postVarSets' => array (
  '_DEFAULT' => array (
    // EXT:news start
    'news' => array(
            array(
                    'GETvar' => 'tx_news_pi1[action]',
                    'noMatch' => 'bypass'
            ),
            array(
                    'GETvar' => 'tx_news_pi1[controller]',
                    'noMatch' => 'bypass'
            ),
            array(
                    'GETvar' => 'tx_news_pi1[news]',
                    'noMatch' => 'bypass',
                    'lookUpTable' => array(
                           :