why realurl sucks - and how to fix it
DESCRIPTION
RealURL ist eine der meistgenutzten Erweiterungen für TYPO3. Viele Anwender sind jedoch schon an der Konfiguration verzweifelt. Hier sind die Folien zu einem Vortrag anlässlich der TYPO3 Akademie 2011, der sich mit dem Thema RealURL befasstTRANSCRIPT
![Page 1: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/1.jpg)
Why RealURL sucks...(and how to fix it)
TYPO3 Akademie 2011
Montag, 28. Februar 2011
![Page 2: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/2.jpg)
RealURL
• ist fantastisch
• ist extrem flexibel
• ABER ....!
Montag, 28. Februar 2011
![Page 3: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/3.jpg)
Was ist das Problem?
Folie 3 von 3786
Montag, 28. Februar 2011
![Page 4: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/4.jpg)
50 Bugfixes in 6 Monaten
Montag, 28. Februar 2011
![Page 5: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/5.jpg)
Montag, 28. Februar 2011
![Page 6: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/6.jpg)
Warum RealURL ?
• 'Lesbare' URLs
• für Menschen
• für Suchmaschinen
Montag, 28. Februar 2011
![Page 7: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/7.jpg)
SimulateStatic
• Home -> Produkte -> TV -> LCD
[domain]/lcd.html
• Home -> Impressum
[domain]/impressum.html
Montag, 28. Februar 2011
![Page 8: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/8.jpg)
Installation
• Konfigurationsdatei:
Montag, 28. Februar 2011
![Page 9: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/9.jpg)
Installation
• Automatische Konfiguration:
typo3conf/realurl_autoconf.php
• Achtung:wird gelöscht bei Anlegen eines Domain-Records!
Montag, 28. Februar 2011
![Page 10: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/10.jpg)
Installation
Montag, 28. Februar 2011
![Page 11: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/11.jpg)
SpeicherformatSerialized:$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
![Page 12: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/12.jpg)
ohne Konfiguration
• [domain]/index.php?id=123
• [domain]/123/
• [domain]/alias/
Montag, 28. Februar 2011
![Page 13: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/13.jpg)
Autokonfiguration
• [domain]/index.php?id=123
• [domain]/seitentitel/
• [domain]/navigationstitel/
• [domain]/alias/
Montag, 28. Februar 2011
![Page 14: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/14.jpg)
Autokonfiguration
• Nur für Basis-Konfiguration ohne Extensions mit GET Variablen
Montag, 28. Februar 2011
![Page 15: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/15.jpg)
Montag, 28. Februar 2011
![Page 16: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/16.jpg)
/datei-downloads/software/windows/windows-xp.html
/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
![Page 17: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/17.jpg)
/abc/programme.html/abc/programme/windows.html/abc/programme/windows/windows-xp.html
Montag, 28. Februar 2011
![Page 18: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/18.jpg)
/datei-downloads/software.html/datei-downloads/windows.html/datei-downloads/windows/windows-xp.html
Montag, 28. Februar 2011
![Page 19: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/19.jpg)
Funktionsweise RealURL
• Seiten ID + Parameter -> URL
• URL -> Seiten ID + Parameter
Montag, 28. Februar 2011
![Page 20: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/20.jpg)
Teile der URLDomain www.test.de
preVars en
pagePath shop/products/
fixedPostVars create
postVarSets article/123/color
fileName detail.html
Montag, 28. Februar 2011
![Page 21: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/21.jpg)
Kodierung
Überschriften ueberschriften
Académie française academie-francaise
Español espanol
Фотосессия fotosessija
Ελλάδα ellada
מדינת ישראל mdint-ishral
Montag, 28. Februar 2011
![Page 22: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/22.jpg)
Multi Domain[www.domain1.de] => array ( ... ),
[www.domain1.de] => array ( ... ),
[_DEFAULT] => array ( ... ),
Montag, 28. Februar 2011
![Page 23: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/23.jpg)
Multi Domain[_DEFAULT] => array ( ... ),
[www.domain1.de] => array ( ... ),
[www.domain2.de] => array ( ... ),
Montag, 28. Februar 2011
![Page 24: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/24.jpg)
Konfiguration[domain]
init => array (...),redirects => array (...),redirects_regex => array (...),preVars => array (...),pagePath => array (...),fixedPostVars => array (...),postVarSets => array (...)fileName => array (...)
Montag, 28. Februar 2011
![Page 25: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/25.jpg)
init 'enableCHashCache' => true, 'appendMissingSlash' => 'ifNotFile,redirect', 'adminJumpToBackend' => true, 'enableUrlDecodeCache' => true, 'enableUrlEncodeCache' => true, 'emptyUrlReturnValue' => '/', 'respectSimulateStaticURLs' => true,
Montag, 28. Februar 2011
![Page 26: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/26.jpg)
'doNotRawUrlEncodeParameterNames' => true,
• tx_ttnews%5Btt_news%5D=3
wird zu
• tx_ttnews[tt_news]=3
init
Montag, 28. Februar 2011
![Page 27: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/27.jpg)
'enableAllUnicodeLetters' => true,
• ermöglicht URLs in der Form
http://name-der-domain.de/普通話/
init
Montag, 28. Februar 2011
![Page 28: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/28.jpg)
'postVarSet_failureMode' => 'redirect_goodUpperDir',
init
Montag, 28. Februar 2011
![Page 29: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/29.jpg)
'postVarSet_failureMode' => 'ignore',
init
Montag, 28. Februar 2011
![Page 30: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/30.jpg)
Montag, 28. Februar 2011
![Page 31: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/31.jpg)
redirects
'redirects' =>. array ( 'aktuelles/' => '301;http://spiegel.de', ),
Montag, 28. Februar 2011
![Page 32: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/32.jpg)
redirects_regex
'redirects_regex' =>. array ( '^english/(.*)' => '301;en/\1',
'^downloads/(.*)' => 'ftp://dl.domain.tld/public/dl/\1', ),
Montag, 28. Februar 2011
![Page 33: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/33.jpg)
Teile der URLDomain www.test.de
preVars en
pagePath shop/products/
fixedPostVars create
postVarSets article/123/color
fileName detail.html
Montag, 28. Februar 2011
![Page 34: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/34.jpg)
preVars
• http://[domain]/en/news/articel.html
Montag, 28. Februar 2011
![Page 35: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/35.jpg)
preVars'preVars' => array ( 0 => array ( 'GETvar' => 'L', 'valueMap' =>. array ( 'en' => '1', ), 'noMatch' => 'bypass', ), ),
Montag, 28. Februar 2011
![Page 36: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/36.jpg)
preVars
1. Prüfe ob Eintrag in valueMap2. Falls nicht gefunden, setze noMatch3. Prüfe Eintrag in noMatch- 'bypass': Wert wird nicht gesetzt, fortfahren- 'null': Wert wird nicht gesetzt, ignoriere Rest4. Datenbankabruf mit 'lookUpTable'5. Verarbeitung mit 'userFunc'6. Setze Wert mit 'valueDefault'
Montag, 28. Februar 2011
![Page 37: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/37.jpg)
'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
![Page 38: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/38.jpg)
Teile der URLDomain www.test.de
preVars en
pagePath shop/products/
fixedPostVars create
postVarSets article/123/color
fileName detail.html
Montag, 28. Februar 2011
![Page 39: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/39.jpg)
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
![Page 40: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/40.jpg)
Teile der URLDomain www.test.de
preVars en
pagePath shop/products/
fixedPostVars create
postVarSets article/123/color
fileName detail.html
Montag, 28. Februar 2011
![Page 41: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/41.jpg)
postVarSetsfixedPostVars
postVarsSets => array ('123' => array (...),'_DEFAULT' => array (...),
),
Montag, 28. Februar 2011
![Page 42: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/42.jpg)
postVarSets
postVarsSets => array ('_DEFAULT' => array (
'news' => array (...),'calendar' => array (...),'shop' => array (...),
),),
Montag, 28. Februar 2011
![Page 43: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/43.jpg)
postVarSetspostVarsSets => array (
'_DEFAULT' => array ('news' => array ('list' => array (...),'single' => array (...),'archive' => array (...),
),),
),Montag, 28. Februar 2011
![Page 44: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/44.jpg)
'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
![Page 45: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/45.jpg)
Teile der URLDomain www.test.de
preVars en
pagePath shop/products/
fixedPostVars create
postVarSets article/123/color
fileName detail.html
Montag, 28. Februar 2011
![Page 46: Why RealURL sucks - and how to fix it](https://reader034.vdocuments.us/reader034/viewer/2022052601/558a66eed8b42a484a8b46e9/html5/thumbnails/46.jpg)
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