Skip to content

Instantly share code, notes, and snippets.

@fsuter
Last active February 12, 2016 16:29
Show Gist options
  • Save fsuter/a96c09c5d8ad1e4b13ac to your computer and use it in GitHub Desktop.
Save fsuter/a96c09c5d8ad1e4b13ac to your computer and use it in GitHub Desktop.
RealURL 2.0 cleaned up configuration
<?php
/**
* RealURL configuration for the default host
*/
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
// General configuration
'init' => array(
'appendMissingSlash' => 'ifNotFile',
),
// Pre variables
'preVars' => array(
// No cache
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'no_cache' => 1,
),
'noMatch' => 'bypass',
),
// Language
array(
'GETvar' => 'L',
'valueMap' => array(
'fr' => '0',
'en' => '1',
'de' => '2',
),
'valueDefault' => 'fr'
),
),
// Transformation method
'pagePath' => array(
'rootpage_id' => 1,
),
// Fixed post variables
'fixedPostVars' => array(),
// Post variables
'postVarSets' => array(
'_DEFAULT' => array(
// Page browser
'page' => array(
array(
'GETvar' => 'tx_displaycontroller[page]',
),
),
// News articles
'article' => array(
array(
'GETvar' => 'tx_displaycontroller[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'CONCAT(crdate, "-", IF (path_segment != "", path_segment, title))',
'maxLength' => 200,
'addWhereClause' => ' AND NOT deleted',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
'enable404forInvalidAlias' => 1
),
),
),
// Events
'event' => array(
array(
'GETvar' => 'tx_displaycontroller[event]',
'lookUpTable' => array(
'table' => 'tx_cwevents_domain_model_event',
'id_field' => 'uid',
'alias_field' => 'CONCAT(title,"-",crdate)',
'maxLength' => 200,
'addWhereClause' => ' AND NOT deleted',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
'enable404forInvalidAlias' => 1
),
),
),
// Content widgets
'cwt' => array(
array(
'GETvar' => 'cw_ctype'
)
),
'cwv' => array(
array(
'GETvar' => 'cw_cvar'
)
),
'cwc' => array(
array(
'GETvar' => 'cw_cuid'
)
),
'cwb' => array(
array(
'GETvar' => 'cw_cback'
)
),
'cwo' => array(
array(
'GETvar' => 'cw_output'
)
),
),
),
// File names
'fileName' => array(
'index' => array(
'rss.xml' => array(
'keyValues' => array(
'type' => 100,
),
),
'print.html' => array(
'keyValues' => array (
'print' => 1,
),
),
'widget.html' => array(
'keyValues' => array(
'type' => 4653
)
)
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment