RealURL

 
Encoding: Decoding: $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][] = 'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';    1: $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(    2:     'preVars' => array(    3:         array(    4:             'GETvar' => 'L',    5:             'valueMap' => array(    6:                 'dk' => '1',    7:             ),    8:             'noMatch' => 'bypass',    9:         ),   10:     ),   11:     'fileName' => array (   12:         'index' => array(   13:             'page.html' => array(   14:                 'keyValues' => array (   15:                     'type' => 1,   16:                 )   17:             ),   18:             '_DEFAULT' => array(   19:                 'keyValues' => array(   20:                 )   21:             ),   22:         ),   23:     ),   24:     'postVarSets' => array(   25:         '_DEFAULT' => array (   26:             'news' => array(   27:                 array(   28:                     'GETvar' => 'tx_mininews[mode]',   29:                     'valueMap' => array(   30:                         'list' => 1,   31:                         'details' => 2,   32:                     )   33:                 ),   34:                 array(   35:                     'GETvar' => 'tx_mininews[showUid]',   36:                 ),   37:             ),   38:         ),   39:     ),   40: );
http://www.my-domain.dk/frontend/
dk/
123/
news/list/456/
page.html
[host-name]
   1: $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(    2:     '_DEFAULT' => array(    3:         ...    4:     ),    5:     'www.typo3.org' => array (    6:         ...    7:     ),    8:     'www.typo3.com' => 'www.typo3.org',    9:     'typo3.com' => 'www.typo3.org',   10:     '192.168.1.123' => '_DEFAULT',   11:     'localhost' => '_DEFAULT',   12: );
   1: array(    2:     'init' => array(    3:         ...    4:     ),    5:     'redirects' => array(    6:         '' => 'cms/',    // If default URL, redirect to subdir "cms/"    7:         'test/' => 'http://www.test.test/',    // If subdir is "test/" then redirect to URL    8:         'myFolder/mySubfolder/myFile.html' => 'test/index.php',    9:     ),   10:     'preVars' => array(   11:         array(   12:             ...   13:         ),   14:         array(   15:             ...   16:         ),   17:     ),   18:     'pagePath' => array(   19:         ...   20:     ),   21:     'fixedPostVars' => array(   22:         '1383' => array (   23:             array(   24:                 ...   25:             ),   26:             array(   27:                 ...   28:             ),   29:         ),   30:         '123' => '1383'   31:     ),   32:     'postVarSets' => array(   33:         '_DEFAULT' => array (   34:             'consultancy' => array(   35:                 ...   36:             ),   37:             'admin' => array(   38:                 ...   39:             )   40:         ),   41:     ),   42:     'fileName' => array(   43:         ...   44:     )   45: );  
Keyword: "ifNotFile"
The index array defines various actions and the first segment of the path is used as key to look up which action in the array to take. See ->actionConfig for more details and examples.
The GET var name for which this processing is done.   Required   The value of the GETvar will pass through a transformation defined by the other configuration options here.  Basically this is the flow:
  • First, check if "condPrevValue" allows processing and if not, return accordingly.
  • The value is translated through the "valueMap" if entries matches
  • If no entries in "valueMap" matched, "noMatch" is consulted for an action on this situation.
  • If noMatch did not trigger, we look for a lookup table and if defined we make a look up translation ("lookUpTable").
  • If no lookup table was defined to translate the value, we look for the "valueDefault" and if set, apply that value.
  • If none of these actions captured the value we just pass it through in its raw form.
If this key is set the segment will be processed only if the previous value is found in the comma list of this value! Otherwise it will be bypassed.  
   1:     'preVars' => array(    2:         array(    3:             'GETvar' => 'no_cache',    4:             'valueMap' => array(    5:                 'no_cache' => 1,    6:             ),    7:             'noMatch' => 'bypass',    8:         ),    9:         array(   10:             'GETvar' => 'L',   11:             'valueMap' => array(   12:                 'dk' => '1',   13:                 'danish' => '1',   14:                 'uk' => '2',   15:                 'english' => '2',   16:             ),   17:             'noMatch' => 'bypass',   18:         ),   19:     ),    1:     'preVars' => array(    2:         array(    3:             'GETvar' => 'no_cache',    4:             'valueMap' => array(    5:                 'no_cache' => 1,    6:             ),    7:             'noMatch' => 'bypass',    8:         ),    9:         array(   10:             'GETvar' => 'L',   11:             'valueMap' => array(   12:                 'dk' => '1',   13:                 'danish' => '1',   14:                 'uk' => '2',   15:                 'english' => '2',   16:             ),   17:             'valueDefault' => 'uk',   18:         ),   19:     ),    1:     'fixedPostVars' => array(    2:         'testPlaceHolder' => array (    3:             array(    4:                 'GETvar' => 'tx_extrepmgm_pi1[mode]',    5:                 'valueMap' => array (    6:                     'new' => 1,    7:                     'categories' => 2,    8:                     'popular' => 3,    9:                     'reviewed' => 4,   10:                     'state' => 7,   11:                     'list' => 5,   12:                 )   13:             ),   14:             array(   15:                 'condPrevValue' => '2',   16:                 'GETvar' => 'tx_extrepmgm_pi1[display_cat]',   17:                 'valueMap' => array (   18:                     'docs' => 10,   19:                 ),   20:             ),   21:             array(   22:                 'GETvar' => 'tx_extrepmgm_pi1[showUid]',   23:                 'lookUpTable' => array(   24:                             'table' => 'tx_extrep_keytable',   25:                             'id_field' => 'uid',   26:                             'alias_field' => 'extension_key',   27:                             'addWhereClause' => ' AND NOT deleted'   28:                         )   29:             ),   30:             array(   31:                 'GETvar' => 'tx_extrepmgm_pi1[cmd]',   32:             )   33:         ),   34:         '1383' => 'testPlaceHolder',
                        'lookUpTable' => array(                             'table' => 'user_3dsplmxml_bfsbrand',                             'id_field' => 'xml_id',                             'alias_field' => 'xml_title',                             'maxLength' => 10,                             'addWhereClause' => ' AND NOT deleted'
   1:     'redirects' => array(    2:         '' => 'cms/',    3:         'mailinglist/' => 'http://lists.netfielders.de',    4:     ),    5:     'preVars' => array (    6:         array(    7:             'type' => 'action',        // "type" action    8:             'index' => array(    9:                 'cms' => '',    // Just bypass   10:                 'admin' => array(   11:                     'type' => 'admin'    // Jump BE login OR setting frontend edit flags...   12:                 ),   13:                 'search' => array(   14:                     'type' => 'redirect',    // Redirect...   15:                     'url' => 'index.php?id=1344&tx_indexedsearch[sword]=###REMAIN_PATH###',   16:                 ),   17:                 'ext' => array(   18:                     'type' => 'redirect',    // Redirect...   19:                     'url' => 'cms/1383/list/###REMAIN_PATH###/index.html',   20:                 ),   21:                 '_DEFAULT' => array(   22:                     'type' => 'notfound'    // If key was not found in index, throw "404" not found.   23:                 ),   24:             ),   25:         ),   26:     ),
   1:     'preVars' => array (    2:         array(    3:             'type' => 'action',        // "type" action    4:             'index' => array(    5:                 'admin' => array(    6:                     'type' => 'admin'    // Jump BE login OR setting frontend edit flags...    7:                 ),    8:                 'search' => array(    9:                     'type' => 'redirect',    // Redirect...   10:                     'url' => 'index.php?id=1344&tx_indexedsearch[sword]=###REMAIN_PATH###',   11:                 ),   12:                 'ext' => array(   13:                     'type' => 'redirect',    // Redirect...   14:                     'url' => 'cms/1383/list/###REMAIN_PATH###/index.html',   15:                 ),   16:                 '_DEFAULT' => array(   17:                     'type' => 'bypass'    // If key was not found in index, throw "404" not found.   18:                 ),   19:             ),   20:         ),   21:         array(   22:             'GETvar' => 'L',   23:             'valueMap' => array(   24:                 'dk' => '1',   25:             ),   26:             'noMatch' => 'bypass',   27:         ),   28:     ),
Example value:
    'pagePath' => array(         'type' => 'user',         'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',         'spaceCharacter' => '-',         'languageGetVar' => 'L',         'expireDays' => 3     ),     'pagePath' => array(         'type' => 'user',         'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_dummy->main',     ),
Other modes:
   1:     'postVarSets' => array (    2:         '_DEFAULT' => array(    3:             ....    4:             'edit_now' => array(    5:                 'type' => 'admin'    6:             )    7:         ),    8:     )      1:     'postVarSets' => array(    2:         '_DEFAULT' => array (    3:             'plaintext' => array(    4:                 'type' => 'single',    // Special feature of postVars    5:                 'keyValues' => array (    6:                     'type' => 99    7:                 )    8:             ),    9:             'ext' => array(   10:                 array(   11:                     'GETvar' => 'tx_myExt[p1]',   12:                 ),   13:                 array(   14:                     'GETvar' => 'tx_myExt[p2]',   15:                 ),   16:                 array(   17:                     'GETvar' => 'tx_myExt[p3]',   18:                 ),   19:             ),   20:             'news' => array(   21:                 array(   22:                     'GETvar' => 'tx_mininews[mode]',   23:                     'valueMap' => array(   24:                         'list' => 1,   25:                         'details' => 2,   26:                     )   27:                 ),   28:                 array(   29:                     'GETvar' => 'tx_mininews[showUid]',   30:                 ),   31:             ),   32:         ),   33:     ),  
   1:     'fileName' => array (    2:         'index' => array(    3:             'print.html' => array(    4:                 'keyValues' => array (    5:                     'print' => 1,    6:                     'type' => 1,    7:                 )    8:             ),    9:             'page.html' => array(   10:                 'keyValues' => array (   11:                     'type' => 1,   12:                 )   13:             ),   14:             'top.html' => array(   15:                 'keyValues' => array (   16:                     'type' => 2,   17:                 )   18:             ),   19:             '_DEFAULT' => array(   20:                 'keyValues' => array(   21:                 )   22:             ),   23:         ),   24:     ),     'fileName' => array (         'index' => array(             'index.html' => array(                 'keyValues' => array(                 )             ),         ),     ),
Please don't use config.absRefPrefix. It has some nasty properties that render RealURLs complete unusable sometimes. The only problem is that the 404-page of TYPO3 doesn't have the <base>-tag, so it doesn't show the TYPO3-logo :) Support for this might be allowed when the bugs are fixed but generally it will require all code generating reference to use this method and that cannot be guaranteed for all extensions of course. Make sure you include either configuration it in ALL page-types that are generated!       'pagePath' => array(         'type' => 'user',         'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',         'spaceCharacter' => '-',         'languageGetVar' => 'L',         'expireDays' => 3     ),
(Temporarily disabled)
   1: $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(    2:     '_DEFAULT' => array(    3:         'pagePath' => array(    4:             'type' => 'user',    5:             'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',    6:             'rootpage_id' => 437    7:         ),    8:     ),    9:     'www.test1.intra' => array(   10:         'pagePath' => array(   11:             'type' => 'user',   12:             'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',   13:             'rootpage_id' => 111   14:         ),   15:     )   16: );

To top


Valid XHTML 1.0!