Zum Inhalt springen

Realurl anpassen

Erstellt am 22. Oktober 2004 · 4 Antworten · letzte Antwort am 16. Dezember 2004

Tags: RealURL, URLs & Routing, Frage

just2b ·

Hallo,

ich bin gerade beim konfigurieren von der neuen realurl unter 3.7.0 und komme nicht mehr weiter.
Zur Zeit werden die Seiten so aufgelöst: .com/alias/ aber ich hätte sie gerne .com/alias.html und ich weiss nicht, was ich ändern muss, dass das klappt.

mein Setup:

config.simulateStaticDocuments_noTypeIfNoTitle = 1
config.simulateStaticDocuments = 0 
config.baseURL =1 
config.tx_realurl_enable = 1

meine .htaccess im t3-root:

RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php

Habe leider keine Ahnung von .htaccess-Konfiguration also bitte nicht schlagen, wenns an einer winzigen Kleinigkeit liegt 😉

Schon mal vielen Dank!
Georg

just2b ·

localconf:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'init' => array(
'enableCHashCache' => 1
),
'preVars' => array(
array(
'GETvar' => 'no_cache',
'valueMap' => array('no_cache' => 1,),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'L',
'valueMap' => array('de' => '0',
'en' => '1',
),
'noMatch' => 'bypass',
),
),
'fileName' => array (
'index' => array(
'backend.php' => array(
'keyValues' => array (
'type' => 100,
)
),
'print' => array(
'keyValues' => array(
'type' => 98,
)
),
),
'defaultToHTMLsuffixOnPrev' => 1,
),

);

htacess

RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php

sollt funktionieren
lg georg

Andreas B.​ ·

Meine funktionierende Lösung lautet jetzt:

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'][] = 'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][] = 'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urldecodecache'] = 'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urlencodecache'] = 'tx_realurl_urlencodecache';

$TYPO3_CONF_VARS['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment,alias,nav_title,title';
// realurl config
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array('_DEFAULT' => array(),
   'www.in-memoriam-gabi.de' => array('init' => array('enableCHashCache' => 1, 
            // 'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
            ),
        'redirects' => array(),
        'preVars' => array(
            array('GETvar' => 'no_cache',
                'valueMap' => array('nc' => 1,
                    ),
                'noMatch' => 'bypass',
                ),
            array('GETvar' => 'L',
                'valueMap' => array('en' => '3', 
                    // 'dansk' => '3',
                    'de' => '0', 
                    // 'deutsch' => '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' => 454, 
            // 'encodeTitle_userProc'=>'EXT:realurl/tx_realurl_encodeTitle_userProc.php:&user_encodeDates',
            ),
        'fixedPostVars' => array(),
        'postVarSets' => array('_DEFAULT' => array(
     
                // archive
                'period' => array(

                    array('condPrevValue' => -1,
                        'GETvar' => 'tx_ttnews[pS]' , 
                        // 'valueMap' => array(
                        // 
                        // )
                        ),
                    array('GETvar' => 'tx_ttnews[pL]' , 
                        // 'valueMap' => array(
              
                        // 
                        // )
                        ),
                    array('GETvar' => 'tx_ttnews[arc]' ,
                        'valueMap' => array('archived' => 1,
                            'non-archived' => -1,
                            )

                        ),
                    ), 
                // pagebrowser
                'browse' => array(
                    array('GETvar' => 'tx_ttnews[pointer]',
                        ),

                    ),

                'select' => array (
                    array('GETvar' => 'tx_ttnews[cat]',
                        'lookUpTable' => array('table' => 'tt_news_cat',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array('strtolower' => 1,
                                ),
                            ),
                        ),
                    ),

					        // backPid link
//                'back_to' => array(
//                    array('GETvar' => 'tx_ttnews[backPid]',
//					 'lookUpTable' => array('table' => 'pages',
//                            'id_field' => 'uid',
//                            'alias_field' => 'title',
//                            'addWhereClause' => ' AND NOT deleted',
//                            'useUniqueCache' => 1,
//                            'useUniqueCache_conf' => array('strtolower' => 1,
//                                'spaceCharacter' => '-',
//                               ),
//                           ),
//                        ),
//                    ),
					
					
					
                'article' => array(
                  array('GETvar' => 'tx_ttnews[backPid]',
                        ),

                    array('GETvar' => 'tx_ttnews[tt_news]',
                        'lookUpTable' => array('table' => 'tt_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array('strtolower' => 1,
                                'spaceCharacter' => '-',
                                ),

                            ),
                        ),

                    array('GETvar' => 'tx_ttnews[swords]'
                        ),

                    ),

                ),
            ),
        'fileName' => array('index' => array('rss.xml' => array('keyValues' => array('type' => 100,
                        ),
                    ), 
                // 'index.html' => array(
                // 'keyValues' => array(),
                // ),
                ),

            'defaultToHTMLsuffixOnPrev' => 1,
            ),
        )
    );

Leider schaffe ich es nicht, das Ganze für mehrere Domains zum Laufen zu bringen (also nicht nur eine). Weiss jemand bitte Rat?