Skip to content

Instantly share code, notes, and snippets.

@wojtablo
Forked from oliverthiele/realurl_conf.php
Last active August 25, 2015 23:08
Show Gist options
  • Select an option

  • Save wojtablo/b99e93bd6ba64372544b to your computer and use it in GitHub Desktop.

Select an option

Save wojtablo/b99e93bd6ba64372544b to your computer and use it in GitHub Desktop.

Revisions

  1. @oliverthiele oliverthiele revised this gist Aug 25, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realurl_conf.php
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@
    'spaceCharacter' => '-',
    'languageGetVar' => 'L',
    'expireDays' => 3,
    'rootpage_id' => 1, // ANPASSEN!!!
    'rootpage_id' => 1, // Your root page uid
    'firstHitPathCache' => 1,
    ),
    'fixedPostVars' => array(
  2. @oliverthiele oliverthiele created this gist Aug 25, 2015.
    262 changes: 262 additions & 0 deletions realurl_conf.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,262 @@
    <?php
    $TYPO3_CONF_VARS['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment';
    $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    '_DEFAULT' => array(
    'init' => array(
    'enableCHashCache' => true,
    'appendMissingSlash' => 'ifNotFile,redirect[301]',
    'enableUrlDecodeCache' => true,
    'enableUrlEncodeCache' => true,
    'adminJumpToBackend' => true,
    'respectSimulateStaticURLs' => 0,
    'postVarSet_failureMode' => '',
    'emptyUrlReturnValue' => '/',
    'enableAllUnicodeLetters' => 1,
    'doNotRawUrlEncodeParameterNames' => 1
    ),
    // Don't use Redirects here. Redirects in webserver or reverse proxys are faster
    'redirects' => array(),
    'preVars' => array(
    array(
    'GETvar' => 'no_cache',
    'valueMap' => array(
    'nc' => 1,
    ),
    'noMatch' => 'bypass',
    ),
    array(
    'GETvar' => 'L',
    'valueMap' => array(
    // Don't configure L=0, Duplicate Content is the result!
    // 'en' => '0',
    'de' => '1',
    'at' => '2'
    ),
    'valueDefault' => 'de',
    'noMatch' => 'bypass',
    ),
    ),
    'pagePath' => array(
    'type' => 'user',
    'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
    'spaceCharacter' => '-',
    'languageGetVar' => 'L',
    'expireDays' => 3,
    'rootpage_id' => 1, // ANPASSEN!!!
    'firstHitPathCache' => 1,
    ),
    'fixedPostVars' => array(
    'newsDetailConfiguration' => array(
    array(
    'GETvar' => 'tx_news_pi1[action]',
    'valueMap' => array(
    'detail' => '',
    ),
    'noMatch' => 'bypass'
    ),
    array(
    'GETvar' => 'tx_news_pi1[controller]',
    'valueMap' => array(
    'News' => '',
    ),
    'noMatch' => 'bypass'
    ),
    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,
    )
    )
    ),
    'newsCategoryConfiguration' => array(
    array(
    'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
    'lookUpTable' => array(
    'table' => 'sys_category',
    'id_field' => 'uid',
    'alias_field' => 'title',
    'addWhereClause' => ' AND NOT deleted',
    'useUniqueCache' => 1,
    'useUniqueCache_conf' => array(
    'strtolower' => 1,
    'spaceCharacter' => '-'
    )
    )
    )
    ),
    'newsTagConfiguration' => array(
    array(
    'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
    'lookUpTable' => array(
    'table' => 'tx_news_domain_model_tag',
    'id_field' => 'uid',
    'alias_field' => 'title',
    'addWhereClause' => ' AND NOT deleted',
    'useUniqueCache' => 1,
    'useUniqueCache_conf' => array(
    'strtolower' => 1,
    'spaceCharacter' => '-'
    )
    )
    )
    ),
    # Edit pageUid => configuration
    '8' => 'newsDetailConfiguration',
    // '701' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well
    // '71' => 'newsTagConfiguration',
    // '72' => 'newsCategoryConfiguration',
    ),
    'postVarSets' => array(
    '_DEFAULT' => array(
    'plaintext' => array(
    'type' => 'single', // Special feature of postVars
    'keyValues' => array(
    'type' => 99
    )
    ),
    'controller' => array(
    array(
    'GETvar' => 'tx_news_pi1[action]',
    'noMatch' => 'bypass'
    ),
    array(
    'GETvar' => 'tx_news_pi1[controller]',
    'noMatch' => 'bypass'
    )
    ),
    'dateFilter' => array(
    array(
    'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
    ),
    array(
    'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
    ),
    ),
    'page' => array(
    array(
    'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
    ),
    ),
    // Configuration for the old "ttnews" extension

    // // news archive parameters
    // 'archive' => array(
    // array(
    // 'GETvar' => 'tx_ttnews[year]',
    // ),
    // array(
    // 'GETvar' => 'tx_ttnews[month]',
    // 'valueMap' => array(
    // 'january' => '01',
    // 'february' => '02',
    // 'march' => '03',
    // 'april' => '04',
    // 'may' => '05',
    // 'june' => '06',
    // 'july' => '07',
    // 'august' => '08',
    // 'september' => '09',
    // 'october' => '10',
    // 'november' => '11',
    // 'december' => '12',
    // )
    // ),
    // ),
    // // news pagebrowser
    // 'browse' => array(
    // array(
    // 'GETvar' => 'tx_ttnews[pointer]',
    // ),
    // ),
    // // news categories
    // 'select_category' => array(
    // array(
    // 'GETvar' => 'tx_ttnews[cat]',
    // ),
    // ),
    // // news articles and searchwords
    // 'article' => array(
    // 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[backPid]',
    // ),
    // array(
    // 'GETvar' => 'tx_ttnews[swords]',
    // ),
    // ),
    ),
    ),
    // configure filenames for different pagetypes
    'fileName' => array(
    // Slash or .html
    'defaultToHTMLsuffixOnPrev' => 0,
    'acceptHTMLsuffix' => 1,
    'index' => array(
    # If you want index.html simulated ...
    // 'index.html' => array(
    // 'keyValues' => array()
    // ),
    '_DEFAULT' => array(
    'keyValues' => array()
    ),
    'sitemap.xml' => array(
    'keyValues' => array(
    'type' => 20,
    ),
    ),
    'print.html' => array(
    'keyValues' => array(
    'type' => 98,
    ),
    ),
    '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,
    ),
    ),
    ),
    ),
    ),
    );