[TYPO3-english] RealURL force preVar

Urs Bräm info at ursbraem.ch
Mon Jan 9 23:04:35 CET 2012


Hi

is it possible to make RealURL force the preVar language parameter to 
avoid duplicate content?

My sites mostly should have a symmetrical URL structure for each 
language, like so:

example.com/de/kontakt (L=0)
example.com/fr/contact (L=1)

not like so:

example.com/kontakt (L=0)
example.com/fr/contact (L=1)

(as in the second example it would make the impression that the two 
languages don't have the same value, as german would be the main 
language and french a mere translation; a swiss political issue)

This symmetrical URL structure is of course easy to achieve, but still 
Links in the form of example.com/kontakt *do work* and generate pages 
without the preVar in all the links. Is there a way to force TYPO3 to 
always maintain the preVar and force the default language into the URL 
if nothing is set??

I'm not that concerned about DC, but I have had a few other problems 
resulting from confusions with the multiple URLs.

Thanks!
Urs

PS here's my Config. I know "'noMatch' => 'bypass'" is usually not set, 
but I need it and turning it off wouldn't change anything regarding to a 
URL without preVar:

<?php
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
         'init' => array(
             'enableCHashCache' => 1,
             'appendMissingSlash' => 'ifNotFile',
             'enableUrlDecodeCache' => 1,
             'enableUrlEncodeCache' => 1,
             'respectSimulateStaticURLs' => 0,
             //'postVarSet_failureMode'=>'redirect_goodUpperDir',
         ),
     'redirects_regex' => array (

     ),
     'preVars' => array(
                         array(
                              'GETvar' => 'L',
                              'valueMap' => array(
                                                 'de' => '0',
                                                 'fr' => '1',
                                         ),
                              'valueDefault' => 'de',
                              'noMatch' => 'bypass',
                         ),
                       array(
                                 'GETvar' => 'no_cache',
                                 'valueMap' => array(
                                     'no_cache' => 1,
                                 ),
                                 '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' => 1,
         ),


          'postVarSets' => array(
             '_DEFAULT' => array(
                 // news archive parameters
                 'date' => array(
                     array(
                         'GETvar' => 'tx_ttnews[month]' ,

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

                     ),
                 // news pagebrowser
                 'browse' => array(
                     array(
                         'GETvar' => 'tx_ttnews[pointer]',
                         ),
                     ),
                 // news categories
                 'select_category' => array (
                     array(
                         'GETvar' => 'tx_ttnews[cat]',
                         ),
                     ),
                 // news articles and searchwords
                 'art' => array(
                         array(
                           'GETvar' => 'tx_ttnews[pointer]',
                           'valueMap' => array(),
                           'noMatch' => 'bypass',
                         ),
                         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' => '-',
                             ),
                             'languageGetVar' => 'L',
                             'languageExceptionUids' => '',
                             'languageField' => 'sys_language_uid',
                             'transOrigPointerField' => 'l18n_parent',
                             'autoUpdate' => 1,
                             'expireDays' => 180,
                           ),
                         ),
                       ),
                 ),
             ),

       'fileName' => array(
             'defaultToHTMLsuffixOnPrev'=>0,
             'index' => array(
                 '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,
                     ),
                 ),
             ),
         ),
  );
  php?>

-- 
Urs Bräm
macht Websites
---
Certified Typo3 Integrator
CH-3011 Bern
www.ursbraem.ch


More information about the TYPO3-english mailing list