[TYPO3] RealUrl and unwanted spaces

Lukas Mattsson lukas at antroposofi.info
Tue Dec 18 12:02:21 CET 2007


I get some 404s when people access my site from links in newsletter and 
forums where unwanted spaces is inserted or appended to the url.
Can I force RealUrl to strip away all the spaces in some way, or can I 
do it in .htaccess

My RealUrk conf is:
<?php

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

$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';

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
         '_DEFAULT' => array(
             'pagePath' => array(
                 'type' => 'user',
                 'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
                 'rootpage_id' => 1,
                 'spaceCharacter' => '_',
                 'languageGetVar' => 'L',
                 'expireDays' => 3
             ),
             'init' => array(
                'enableCHashCache' => 1,
                'appendMissingSlash' => 'ifNotFile',
                'enableUrlDecodeCache' => 1,
                'enableUrlEncodeCache' => 1
             )
         )
     );
?>


More information about the TYPO3-english mailing list