Why RealURL sucks...
                                          (and how to fix it)


                                       TYPO3 Akademie 2011




Montag, 28. Februar 2011
RealURL

                    •      ist fantastisch
                    •      ist extrem flexibel


                    •      ABER ....!




Montag, 28. Februar 2011
Was ist das Problem?


            Folie 3 von 3786
Montag, 28. Februar 2011
50 Bugfixes in 6 Monaten




Montag, 28. Februar 2011
Montag, 28. Februar 2011
Warum RealURL ?

                    •      'Lesbare' URLs
                           •   für Menschen
                           •   für Suchmaschinen




Montag, 28. Februar 2011
SimulateStatic
                    •      Home -> Produkte -> TV -> LCD

                           [domain]/lcd.html


                    •      Home -> Impressum

                           [domain]/impressum.html


Montag, 28. Februar 2011
Installation

                    •      Konfigurationsdatei:




Montag, 28. Februar 2011
Installation
                      •    Automatische Konfiguration:




                           typo3conf/realurl_autoconf.php
                      •    Achtung:
                           wird gelöscht bei Anlegen eines Domain-
                           Records!
Montag, 28. Februar 2011
Installation




Montag, 28. Februar 2011
Speicherformat
       Serialized:
       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=unserialize('a:
       1:{s:8:"_DEFAULT";a:4:{s:4:"init";a:7:{s:16:"enableCHashCache"....

       Source (slow?!):
       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
        '_DEFAULT' =>
        array (
           'init' =>
           array (
             'enableCHashCache' => true,
             'appendMissingSlash' => 'ifNotFile,redirect',
             'adminJumpToBackend' => true,
             'enableUrlDecodeCache' => true,
        ....
Montag, 28. Februar 2011
ohne Konfiguration

                    •      [domain]/index.php?id=123



                    •      [domain]/123/
                    •      [domain]/alias/



Montag, 28. Februar 2011
Autokonfiguration
                    •      [domain]/index.php?id=123



                    •      [domain]/seitentitel/
                    •      [domain]/navigationstitel/
                    •      [domain]/alias/


Montag, 28. Februar 2011
Autokonfiguration


                    •      Nur für Basis-Konfiguration
                           ohne Extensions mit GET Variablen




Montag, 28. Februar 2011
Montag, 28. Februar 2011
/datei-downloads/software/windows/windows-xp.html




      /datei-downloads/programme.html
      /datei-downloads/programme/windows.html
      /datei-downloads/programme/windows/windows-xp.html

Montag, 28. Februar 2011
/abc/programme.html
               /abc/programme/windows.html
               /abc/programme/windows/windows-xp.html




Montag, 28. Februar 2011
/datei-downloads/software.html
                /datei-downloads/windows.html
                /datei-downloads/windows/windows-xp.html



Montag, 28. Februar 2011
Funktionsweise RealURL

                    •      Seiten ID + Parameter -> URL



                    •      URL -> Seiten ID + Parameter




Montag, 28. Februar 2011
Teile der URL
                           Domain             www.test.de
                           preVars                 en
                      pagePath              shop/products/
                 fixedPostVars                    create
                   postVarSets              article/123/color
                      fileName                  detail.html




Montag, 28. Februar 2011
Kodierung
                             Überschriften        ueberschriften
                           Académie française   academie-francaise
                                Español              espanol
                              Фотосессия            fotosessija
                               Ελλάδα                 ellada
                             ‫מדינת ישראל‬           mdint-ishral



Montag, 28. Februar 2011
Multi Domain
                           [www.domain1.de] =>
                               array ( ... ),

                           [www.domain1.de] =>
                               array ( ... ),

                           [_DEFAULT] =>
                               array ( ... ),


Montag, 28. Februar 2011
Multi Domain
                           [_DEFAULT] =>
                               array ( ... ),

                           [www.domain1.de] =>
                               array ( ... ),

                           [www.domain2.de] =>
                               array ( ... ),


Montag, 28. Februar 2011
Konfiguration
     [domain]
        init => array (...),
        redirects => array (...),
        redirects_regex => array (...),
        preVars => array (...),
        pagePath => array (...),
        fixedPostVars => array (...),
        postVarSets => array (...)
        fileName => array (...)

Montag, 28. Februar 2011
init
                           'enableCHashCache' => true,
                           'appendMissingSlash' => 'ifNotFile,redirect',
                           'adminJumpToBackend' => true,
                           'enableUrlDecodeCache' => true,
                           'enableUrlEncodeCache' => true,
                           'emptyUrlReturnValue' => '/',
                           'respectSimulateStaticURLs' => true,




Montag, 28. Februar 2011
init

       'doNotRawUrlEncodeParameterNames' => true,

                       •   tx_ttnews%5Btt_news%5D=3

                           wird zu
                       •   tx_ttnews[tt_news]=3



Montag, 28. Februar 2011
init

                           'enableAllUnicodeLetters' => true,


                       •   ermöglicht URLs in der Form

                           http://name-der-domain.de/      /




Montag, 28. Februar 2011
init

           'postVarSet_failureMode' => 'redirect_goodUpperDir',




Montag, 28. Februar 2011
init

                           'postVarSet_failureMode' => 'ignore',




Montag, 28. Februar 2011
Montag, 28. Februar 2011
redirects

     'redirects' =>.
        array (
           'aktuelles/' => '301;http://spiegel.de',
        ),




Montag, 28. Februar 2011
redirects_regex

     'redirects_regex' =>.
        array (
          '^english/(.*)' => '301;en/1',

                 '^downloads/(.*)' => 'ftp://dl.domain.tld/public/dl/1',
            ),




Montag, 28. Februar 2011
Teile der URL
                       Domain                 www.test.de
                           preVars                 en
                      pagePath              shop/products/
                fixedPostVars                     create
                  postVarSets               article/123/color
                      fileName                  detail.html




Montag, 28. Februar 2011
preVars


                    •      http://[domain]/en/news/articel.html




Montag, 28. Februar 2011
preVars
                      'preVars' =>
                          array (
                             0 =>
                             array (
                                'GETvar' => 'L',
                                'valueMap' =>.
                                   array (
                                     'en' => '1',
                                ),
                                'noMatch' => 'bypass',
                             ),
                          ),
Montag, 28. Februar 2011
preVars
           1. Prüfe ob Eintrag in valueMap
           2. Falls nicht gefunden, setze noMatch
           3. Prüfe Eintrag in noMatch
           - 'bypass': Wert wird nicht gesetzt, fortfahren
           - 'null': Wert wird nicht gesetzt, ignoriere Rest
           4. Datenbankabruf mit 'lookUpTable'
           5.Verarbeitung mit 'userFunc'
           6. Setze Wert mit 'valueDefault'



Montag, 28. Februar 2011
'lookUpTable' => array(
            'table' => 'tt_news',
            'id_field' => 'uid',
            'alias_field' => 'title',
            'maxLength' => 50,
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array (
               'strtolower' => '1'.
               'spaceCharacter' => '-',
               'encodeTitle_userProc' => '...'
            )
            'addWhereClause' => ' AND NOT deleted',
            'languageGetVar' => 'L',
            'languageExceptionUids' => '',
            'languageField' => 'sys_language_uid',
            'transOrigPointerField' => 'l18n_parent',
            'enable404forInvalidAlias' => '1',
            'autoUpdate' => '1',
            'expireDays' => '60'
         )


Montag, 28. Februar 2011
Teile der URL
                           Domain             www.test.de
                           preVars                 en
                      pagePath              shop/products/
                 fixedPostVars                    create
                   postVarSets              article/123/color
                      fileName                  detail.html




Montag, 28. Februar 2011
pagePath
    'pagePath' => array(
       'type' => 'user',
       'userFunc' => 'EXT:realurl/
    class.tx_realurl_advanced.php:&tx_realurl_advanced->main',

           'spaceCharacter' => '-',
           'languageGetVar' => 'L',
           'expireDays' => 30
    ),




Montag, 28. Februar 2011
Teile der URL
                           Domain             www.test.de
                           preVars                 en
                      pagePath              shop/products/
                 fixedPostVars                    create
                   postVarSets              article/123/color
                      fileName                  detail.html




Montag, 28. Februar 2011
postVarSets
                           fixedPostVars
                   postVarsSets => array (
                      '123' => array (...),
                      '_DEFAULT' => array (...),
                   ),




Montag, 28. Februar 2011
postVarSets
                   postVarsSets => array (
                      '_DEFAULT' => array (
                         'news' => array (...),
                         'calendar' => array (...),
                         'shop' => array (...),
                      ),
                   ),


Montag, 28. Februar 2011
postVarSets
                   postVarsSets => array (
                      '_DEFAULT' => array (
                         'news' => array (
                          'list' => array (...),
                          'single' => array (...),
                          'archive' => array (...),
                         ),
                      ),
                   ),
Montag, 28. Februar 2011
'postVarSets' => array(
              '_DEFAULT' => array(
                  // 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',
                              )
                          ),
Montag, 28. Februar 2011
Teile der URL
                           Domain             www.test.de
                           preVars                 en
                      pagePath              shop/products/
                 fixedPostVars                    create
                   postVarSets              article/123/color
                      fileName                  detail.html




Montag, 28. Februar 2011
fileName
            'fileName' => array(
                      'defaultToHTMLsuffixOnPrev' => '1',
                      'acceptHTMLsuffix' => '1',

                           'index' => array(
                                'rss.xml' => array(
                                     'keyValues' => array(
                                          'type' => 100,
                                      ),
                                 ),
                                '.pdf' => array(
                                     'keyValues' => array(
                                          'type' => 123,
                                      ),
                                ),
                                'print.html' => array(
                                      'keyValues' => array(
                                           'type' => 98,
                                       ),
                                 ),
                           ),
            ),




Montag, 28. Februar 2011

Weitere ähnliche Inhalte

PPTX
jQuery in TYPO3 nutzen
PDF
TU/e - Back to the TYPO3 CMS basics
PDF
Debugging, Monitoring and Profiling in TYPO3
 
PDF
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
PDF
Langsame webseiten nerven okt-2013
PDF
Langsame webseiten nerven- Tipps für TYPO3
PDF
Solr typo3 konfiguration workshop
PDF
30 questions that you should ask your hosting provider
jQuery in TYPO3 nutzen
TU/e - Back to the TYPO3 CMS basics
Debugging, Monitoring and Profiling in TYPO3
 
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
Langsame webseiten nerven okt-2013
Langsame webseiten nerven- Tipps für TYPO3
Solr typo3 konfiguration workshop
30 questions that you should ask your hosting provider

Mehr von jweiland (6)

PDF
Make Your TYPO3 Web Sites Fly
KEY
TYPO3 SEO
PDF
TYPO3 Caching
PDF
Spark Plugs, Oil Change, Filter - How to keep your TYPO3 site running with re...
KEY
Using TSconfig to tailor TYPO3 to your needs
PDF
Security Checklist for TYPO3
Make Your TYPO3 Web Sites Fly
TYPO3 SEO
TYPO3 Caching
Spark Plugs, Oil Change, Filter - How to keep your TYPO3 site running with re...
Using TSconfig to tailor TYPO3 to your needs
Security Checklist for TYPO3
Anzeige

Why RealURL sucks - and how to fix it

  • 1. Why RealURL sucks... (and how to fix it) TYPO3 Akademie 2011 Montag, 28. Februar 2011
  • 2. RealURL • ist fantastisch • ist extrem flexibel • ABER ....! Montag, 28. Februar 2011
  • 3. Was ist das Problem? Folie 3 von 3786 Montag, 28. Februar 2011
  • 4. 50 Bugfixes in 6 Monaten Montag, 28. Februar 2011
  • 6. Warum RealURL ? • 'Lesbare' URLs • für Menschen • für Suchmaschinen Montag, 28. Februar 2011
  • 7. SimulateStatic • Home -> Produkte -> TV -> LCD [domain]/lcd.html • Home -> Impressum [domain]/impressum.html Montag, 28. Februar 2011
  • 8. Installation • Konfigurationsdatei: Montag, 28. Februar 2011
  • 9. Installation • Automatische Konfiguration: typo3conf/realurl_autoconf.php • Achtung: wird gelöscht bei Anlegen eines Domain- Records! Montag, 28. Februar 2011
  • 11. Speicherformat Serialized: $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=unserialize('a: 1:{s:8:"_DEFAULT";a:4:{s:4:"init";a:7:{s:16:"enableCHashCache".... Source (slow?!): $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array ( '_DEFAULT' => array ( 'init' => array ( 'enableCHashCache' => true, 'appendMissingSlash' => 'ifNotFile,redirect', 'adminJumpToBackend' => true, 'enableUrlDecodeCache' => true, .... Montag, 28. Februar 2011
  • 12. ohne Konfiguration • [domain]/index.php?id=123 • [domain]/123/ • [domain]/alias/ Montag, 28. Februar 2011
  • 13. Autokonfiguration • [domain]/index.php?id=123 • [domain]/seitentitel/ • [domain]/navigationstitel/ • [domain]/alias/ Montag, 28. Februar 2011
  • 14. Autokonfiguration • Nur für Basis-Konfiguration ohne Extensions mit GET Variablen Montag, 28. Februar 2011
  • 16. /datei-downloads/software/windows/windows-xp.html /datei-downloads/programme.html /datei-downloads/programme/windows.html /datei-downloads/programme/windows/windows-xp.html Montag, 28. Februar 2011
  • 17. /abc/programme.html /abc/programme/windows.html /abc/programme/windows/windows-xp.html Montag, 28. Februar 2011
  • 18. /datei-downloads/software.html /datei-downloads/windows.html /datei-downloads/windows/windows-xp.html Montag, 28. Februar 2011
  • 19. Funktionsweise RealURL • Seiten ID + Parameter -> URL • URL -> Seiten ID + Parameter Montag, 28. Februar 2011
  • 20. Teile der URL Domain www.test.de preVars en pagePath shop/products/ fixedPostVars create postVarSets article/123/color fileName detail.html Montag, 28. Februar 2011
  • 21. Kodierung Überschriften ueberschriften Académie française academie-francaise Español espanol Фотосессия fotosessija Ελλάδα ellada ‫מדינת ישראל‬ mdint-ishral Montag, 28. Februar 2011
  • 22. Multi Domain [www.domain1.de] => array ( ... ), [www.domain1.de] => array ( ... ), [_DEFAULT] => array ( ... ), Montag, 28. Februar 2011
  • 23. Multi Domain [_DEFAULT] => array ( ... ), [www.domain1.de] => array ( ... ), [www.domain2.de] => array ( ... ), Montag, 28. Februar 2011
  • 24. Konfiguration [domain] init => array (...), redirects => array (...), redirects_regex => array (...), preVars => array (...), pagePath => array (...), fixedPostVars => array (...), postVarSets => array (...) fileName => array (...) Montag, 28. Februar 2011
  • 25. init 'enableCHashCache' => true, 'appendMissingSlash' => 'ifNotFile,redirect', 'adminJumpToBackend' => true, 'enableUrlDecodeCache' => true, 'enableUrlEncodeCache' => true, 'emptyUrlReturnValue' => '/', 'respectSimulateStaticURLs' => true, Montag, 28. Februar 2011
  • 26. init 'doNotRawUrlEncodeParameterNames' => true, • tx_ttnews%5Btt_news%5D=3 wird zu • tx_ttnews[tt_news]=3 Montag, 28. Februar 2011
  • 27. init 'enableAllUnicodeLetters' => true, • ermöglicht URLs in der Form http://name-der-domain.de/ / Montag, 28. Februar 2011
  • 28. init 'postVarSet_failureMode' => 'redirect_goodUpperDir', Montag, 28. Februar 2011
  • 29. init 'postVarSet_failureMode' => 'ignore', Montag, 28. Februar 2011
  • 31. redirects 'redirects' =>. array ( 'aktuelles/' => '301;http://spiegel.de', ), Montag, 28. Februar 2011
  • 32. redirects_regex 'redirects_regex' =>. array ( '^english/(.*)' => '301;en/1', '^downloads/(.*)' => 'ftp://dl.domain.tld/public/dl/1', ), Montag, 28. Februar 2011
  • 33. Teile der URL Domain www.test.de preVars en pagePath shop/products/ fixedPostVars create postVarSets article/123/color fileName detail.html Montag, 28. Februar 2011
  • 34. preVars • http://[domain]/en/news/articel.html Montag, 28. Februar 2011
  • 35. preVars 'preVars' => array ( 0 => array ( 'GETvar' => 'L', 'valueMap' =>. array ( 'en' => '1', ), 'noMatch' => 'bypass', ), ), Montag, 28. Februar 2011
  • 36. preVars 1. Prüfe ob Eintrag in valueMap 2. Falls nicht gefunden, setze noMatch 3. Prüfe Eintrag in noMatch - 'bypass': Wert wird nicht gesetzt, fortfahren - 'null': Wert wird nicht gesetzt, ignoriere Rest 4. Datenbankabruf mit 'lookUpTable' 5.Verarbeitung mit 'userFunc' 6. Setze Wert mit 'valueDefault' Montag, 28. Februar 2011
  • 37. 'lookUpTable' => array( 'table' => 'tt_news', 'id_field' => 'uid', 'alias_field' => 'title', 'maxLength' => 50, 'useUniqueCache' => 1, 'useUniqueCache_conf' => array ( 'strtolower' => '1'. 'spaceCharacter' => '-', 'encodeTitle_userProc' => '...' ) 'addWhereClause' => ' AND NOT deleted', 'languageGetVar' => 'L', 'languageExceptionUids' => '', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l18n_parent', 'enable404forInvalidAlias' => '1', 'autoUpdate' => '1', 'expireDays' => '60' ) Montag, 28. Februar 2011
  • 38. Teile der URL Domain www.test.de preVars en pagePath shop/products/ fixedPostVars create postVarSets article/123/color fileName detail.html Montag, 28. Februar 2011
  • 39. pagePath 'pagePath' => array( 'type' => 'user', 'userFunc' => 'EXT:realurl/ class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 'spaceCharacter' => '-', 'languageGetVar' => 'L', 'expireDays' => 30 ), Montag, 28. Februar 2011
  • 40. Teile der URL Domain www.test.de preVars en pagePath shop/products/ fixedPostVars create postVarSets article/123/color fileName detail.html Montag, 28. Februar 2011
  • 41. postVarSets fixedPostVars postVarsSets => array ( '123' => array (...), '_DEFAULT' => array (...), ), Montag, 28. Februar 2011
  • 42. postVarSets postVarsSets => array ( '_DEFAULT' => array ( 'news' => array (...), 'calendar' => array (...), 'shop' => array (...), ), ), Montag, 28. Februar 2011
  • 43. postVarSets postVarsSets => array ( '_DEFAULT' => array ( 'news' => array ( 'list' => array (...), 'single' => array (...), 'archive' => array (...), ), ), ), Montag, 28. Februar 2011
  • 44. 'postVarSets' => array(             '_DEFAULT' => array(                 // 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',                             )                         ), Montag, 28. Februar 2011
  • 45. Teile der URL Domain www.test.de preVars en pagePath shop/products/ fixedPostVars create postVarSets article/123/color fileName detail.html Montag, 28. Februar 2011
  • 46. fileName 'fileName' => array( 'defaultToHTMLsuffixOnPrev' => '1', 'acceptHTMLsuffix' => '1', 'index' => array( 'rss.xml' => array( 'keyValues' => array( 'type' => 100, ), ), '.pdf' => array( 'keyValues' => array( 'type' => 123, ), ), 'print.html' => array( 'keyValues' => array( 'type' => 98, ), ), ), ), Montag, 28. Februar 2011