[TYPO3-english] urgent minijob - realurl/multidomain/multilanguage/singletree
G.Unger
skyfreak1 at gmx.net
Fri Jan 22 21:12:42 CET 2010
of cause I can Rik ;)
as explained I had a propper setup already working.
=> domain.de lead to domain.com/de/...
domain.com lead to domain.com/en/...
the guys who helped out were ilya and joey, so all credits go to them.
first create the domain records in T3 without redirect, just the domain
records.
then set propper baseURL in TS (see below).
finally ilya altered a little the '_DOMAINS' array.
so my realurlconf looks like this:
******************
<?php
/**
* RealURL helper script
*
* @author Michael Cannon <michael at cannonbose.com>
* @version $Id: realurl.php,v 1.8 2008/04/02 21:26:54 cannon Exp $
*/
// Prevent new realurl updates from clearing cache
//
unset($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_pathcache']);
//
realurl naming precedence configuration
$TYPO3_CONF_VARS['FE']['addRootLineFields'] .=
',tx_realurl_pathsegment,alias,title';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array();
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain.de'] = array(
'init' => array(
'enableCHashCache' => true
, 'appendMissingSlash' => 'ifNotFile'
//, 'adminJumpToBackend' => true
, 'enableUrlDecodeCache' => true
, 'enableUrlEncodeCache' => true
//, 'emptyUrlReturnValue' => '/'
// Allow for proper SEO 404 handling
//, 'postVarSet_failureMode' => ''
)
, 'redirects' => array()
, 'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
// 'nc' => '1'
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array(
'en' => '1',
),
'noMatch' => 'bypass',
),
)
, 'pagePath' => array(
'type' => 'user'
, 'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main'
, 'spaceCharacter' => '-'
, 'languageGetVar' => 'L'
, 'rootpage_id' => 1
, 'segTitleFieldList' => 'tx_realurl_pathsegment,alias,title'
, 'autoUpdatePathCache'=>'1'
)
, 'fixedPostVars' => array()
, 'postVarSets' => array(
'_DEFAULT' => array(
// news archive parameters
'archive' => array(
array(
'GETvar' => 'tx_ttnews[year]'
)
, array(
'GETvar' => 'tx_ttnews[month]'
// MLC uncomment if month names instead of numbers are
// desired
/*
, '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',
)
*/
)
, array(
'GETvar' => 'tx_ttnews[day]'
)
)
// news pagebrowser
, 'npage' => array(
array(
'GETvar' => 'tx_ttnews[pointer]'
)
)
// news category
, 'article-cat' => array (
array(
'GETvar' => 'tx_ttnews[cat]'
, 'lookUpTable' => array(
'table' => 'tt_news_cat'
, 'id_field' => 'uid'
, 'alias_field' => 'title'
, 'addWhereClause' => ' AND deleted != 1'
, 'useUniqueCache' => 1
, 'useUniqueCache_conf' => array(
'strtolower' => 1
),
),
),
)
// news item
, 'article' => array(
array(
'GETvar' => 'tx_ttnews[tt_news]'
, 'lookUpTable' => array(
'table' => 'tt_news'
, 'id_field' => 'uid'
// MLC Goolge wants uniqueness for spidering
// , 'alias_field' => 'concat(title, " ", uid)'
, 'alias_field' => 'title'
, 'addWhereClause' => ' AND deleted != 1'
, 'useUniqueCache' => 1
, 'useUniqueCache_conf' => array(
'strtolower' => 1
, 'spaceCharacter' => '-'
)
)
)
, array(
'GETvar' => 'tx_ttnews[swords]'
)
)
, 'nbp' => array(
array(
'GETvar' => 'tx_ttnews[backPid]'
)
)
, 'nq' => array(
array(
'GETvar' => 'news_search[search_text]'
)
)
, 'nqc' => array(
array(
'GETvar' => 'news_search[category][]'
)
)
, 'login' => array(
array(
'GETvar' => 'tx_newloginbox_pi3[showUid]'
)
)
, 'forgot-login' => array(
array(
'GETvar' => 'tx_newloginbox_pi1[forgot]'
)
)
, 'search' => array(
array(
'GETvar' => 'tx_indexedsearch[sword]'
)
, array(
'GETvar' => 'tx_indexedsearch[ext]'
)
, array(
'GETvar' => 'tx_indexedsearch[submit_button]'
)
, array(
'GETvar' => 'tx_indexedsearch[_sections]'
)
, array(
'GETvar' => 'tx_indexedsearch[pointer]'
)
)
, 'srfu' => array(
array(
'GETvar' => 'tx_srfeuserregister_pi1[cmd]'
)
, array(
'GETvar' => 'tx_srfeuserregister_pi1[pointer]'
)
, array(
'GETvar' => 'tx_srfeuserregister_pi1[mode]'
)
, array(
'GETvar' => 'tx_srfeuserregister_pi1[sword]'
)
, array(
'GETvar' => 'tx_srfeuserregister_pi1[sort]'
)
)
, 'scal' => array(
array(
'GETvar' => 'tx_desimplecalendar_pi1[showUid]'
)
, array(
'GETvar' => 'tx_desimplecalendar_pi1[form]'
)
, array(
'GETvar' => 'tx_desimplecalendar_pi1[mode]'
)
, array(
'GETvar' => 'tx_desimplecalendar_pi1[backPath]'
)
)
, 'calender-category' => array(
array(
'GETvar' => 'tx_advCalendar_pi1[category]'
)
)
, 'view' => array(
array(
'GETvar' => 'view'
)
)
, 'cforum' => array(
array(
'GETvar' => 'cat_uid'
)
, array(
'GETvar' => 'conf_uid'
)
, array(
'GETvar' => 'thread_uid'
)
, array(
'GETvar' => 'page'
)
, array(
'GETvar' => 'flag'
)
)
, 'event' => array(
array(
'GETvar' => 'eventid'
)
)
, 'ef' => array(
array(
'GETvar' => 'editflag'
)
)
, 'start' => array(
array(
'GETvar' => 'start'
)
)
, 'day' => array(
array(
'GETvar' => 'day'
)
)
, 'week' => array(
array(
'GETvar' => 'week'
)
)
, 'month' => array(
array(
'GETvar' => 'month'
)
)
, 'bu' => array(
array(
'GETvar' => 'backURL'
)
)
, 'cmd' => array(
array(
'GETvar' => 'cmd'
)
)
, 'year' => array(
array(
'GETvar' => 'year'
)
)
, 'rdfi' => array(
array(
'GETvar' => 'tx_nrdfimport_pi1[showUid]'
)
)
, 'sponsor' => array(
array(
'GETvar' => 'tx_t3consultancies_pi1[showUid]'
, 'lookUpTable' => array(
'table' => 'tx_t3consultancies'
, 'id_field' => 'uid'
, 'alias_field' => 'title'
, 'addWhereClause' => ' AND deleted != 1'
, 'useUniqueCache' => 1
, 'useUniqueCache_conf' => array(
'strtolower' => 1
, 'spaceCharacter' => '-'
)
)
)
, array(
'GETvar' => 'tx_t3consultancies_pi1[service]'
)
, array(
'GETvar' => 'tx_t3consultancies_pi1[pointer]'
)
)
, 'slide-show' => array(
array(
'GETvar' => 'tx_gsislideshow_pi1[total]'
)
, array(
'GETvar' => 'tx_gsislideshow_pi1[lastUid]'
)
, array(
'GETvar' => 'tx_gsislideshow_pi1[firstUid]'
)
, array(
'GETvar' => 'tx_gsislideshow_pi1[current]'
)
, array(
'GETvar' => 'tx_gsislideshow_pi1[showUid]'
, 'lookUpTable' => array(
'table' => 'tx_gsislideshow_images'
, 'id_field' => 'uid'
, 'alias_field' => 'caption'
, 'addWhereClause' => ' AND deleted != 1'
, 'useUniqueCache' => 1
, 'useUniqueCache_conf' => array(
'strtolower' => 1
, 'spaceCharacter' => '-'
)
)
)
)
, 'tac' => array(
array(
'GETvar' => 'tac'
)
)
, 'bp' => array(
array(
'GETvar' => 'backPID'
)
)
, 'product' => array(
array(
'GETvar' => 'tt_products'
, 'lookUpTable' => array(
'table' => 'tt_products'
, 'id_field' => 'uid'
// MLC Goolge wants uniqueness for spidering
, 'alias_field' => 'concat(title, " ", uid)'
, 'addWhereClause' => ' AND deleted != 1'
, 'useUniqueCache' => 1
, 'useUniqueCache_conf' => array(
'strtolower' => 1
),
)
)
)
// MLC Bahag photo gallery
, 'gallery' => array(
array(
'GETvar' => 'gallery'
)
)
, 'image' => array(
array(
'GETvar' => 'viewImage'
)
)
, 'rp' => array(
array(
'GETvar' => 'resultPage'
)
)
, 'idx' => array(
array(
'GETvar' => 'idx'
)
)
, 'anmode' => array (
array('GETvar' => 'tx_piapappnote_pi1[mode]')
)
, 'anptr' => array (
array('GETvar' => 'tx_piapappnote_pi1[pointer]')
)
, 'anfile' => array (
array('GETvar' => 'tx_piapappnote_pi1[file]')
)
, 'anseach' => array (
array('GETvar' => 'tx_piapappnote_pi1[sword]')
)
, 'annote' => array (
array('GETvar' => 'tx_piapappnote_pi1[noteid]')
)
, 'anauth' => array (
array('GETvar' => 'tx_piapappnote_pi1[author]')
)
, 'anname' => array (
array('GETvar' => 'tx_piapappnote_pi1[title]')
)
, 'andesc' => array (
array('GETvar' => 'tx_piapappnote_pi1[description]')
)
, 'ancat' => array (
array('GETvar' => 'tx_piapappnote_pi1[categorylist]')
)
, 'anver' => array (
array('GETvar' => 'tx_piapappnote_pi1[versionlist]')
)
, 'andev' => array (
array('GETvar' => 'tx_piapappnote_pi1[devicelist]')
)
, 'galp' => array (
array('GETvar' => 'tx_hldamgallery_pi1[galleryPID]')
)
, 'galcat' => array (
array('GETvar' => 'tx_hldamgallery_pi1[galleryCID]')
)
, 'galimg' => array (
array('GETvar' => 'tx_hldamgallery_pi1[imgID]')
)
, 'faq-category' => array (
array('GETvar' => 'tx_irfaq_pi1[cat]'
, 'lookUpTable' => array(
'table' => 'tx_irfaq_cat'
, 'id_field' => 'uid'
, 'alias_field' => 'title'
, 'addWhereClause' => ' AND deleted != 1'
, 'useUniqueCache' => 1
, 'useUniqueCache_conf' => array(
'strtolower' => 1
, 'spaceCharacter' => '-'
)
)
)
)
// page comments
, 'skcomm' => array(
array(
'GETvar' => 'tx_skpagecomments_pi1[showComments]',
),
array(
'GETvar' => 'tx_skpagecomments_pi1[showForm]',
),
)
// ab_downloads
, 'dl-act' => array(
array(
'GETvar' => 'tx_abdownloads_pi1[action]',
'valueMap' => array(
'show-category' => 'getviewcategory',
'propose-a-new-download' => 'getviewaddnewdownload',
'open-download' => 'getviewclickeddownload',
'show-details-for-download' => 'getviewdetailsfordownload',
'report-broken-download' => 'getviewreportbrokendownload',
'rate-download' => 'getviewratedownload',
),
),
)
, 'dl-cat' => array(
array(
'GETvar' => 'tx_abdownloads_pi1[category_uid]',
'valueMap' => array(
'home' => '0',
),
'lookUpTable' => array(
'table' => 'tx_abdownloads_category',
'id_field' => 'uid',
'alias_field' => 'label',
'addWhereClause' => ' AND deleted != 1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
)
, 'dl-file' => array(
array(
'GETvar' => 'tx_abdownloads_pi1[uid]',
'lookUpTable' => array(
'table' => 'tx_abdownloads_download',
'id_field' => 'uid',
'alias_field' => 'label',
'addWhereClause' => ' AND deleted != 1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
)
, 'dl-ptr' => array(
array(
'GETvar' => 'tx_abdownloads_pi1[pointer]',
),
)
, 'll-act' => array(
array(
'GETvar' => 'tx_ablinklist_pi1[action]',
'valueMap' => array(
'show-category' => 'getviewcategory',
'propose-a-new-link' => 'getviewaddnewlink',
'open-link' => 'getviewclickedlink',
'show-details-for-link' => 'getviewdetailsforlink',
'report-broken-link' => 'getviewreportbrokenlink',
'rate-link' => 'getviewratelink',
),
),
)
, 'll-cat' => array(
array(
'GETvar' => 'tx_ablinklist_pi1[category_uid]',
'valueMap' => array(
'home' => '0',
),
'lookUpTable' => array(
'table' => 'tx_ablinklist_category',
'id_field' => 'uid',
'alias_field' => 'label',
'addWhereClause' => ' AND deleted != 1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
)
, 'll-link' => array(
array(
'GETvar' => 'tx_ablinklist_pi1[uid]',
'lookUpTable' => array(
'table' => 'tx_ablinklist_link',
'id_field' => 'uid',
'alias_field' => 'label',
'addWhereClause' => ' AND deleted != 1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
)
, 'll-ptr' => array(
array(
'GETvar' => 'tx_ablinklist_pi1[pointer]',
),
)
, 'cal'=> array(
array(
'GETvar' => 'tx_cal_controller[view]'
),
array(
'GETvar' => 'tx_cal_controller[getdate]'
),
array(
'GETvar' => 'tx_cal_controller[lastview]'
),
array(
'GETvar' => 'tx_cal_controller[type]'
),
array(
'GETvar' => 'tx_cal_controller[category]',
'lookUpTable' => array(
'table' => 'tx_cal_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND deleted != 1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array(
'GETvar' => 'tx_cal_controller[uid]',
'lookUpTable' => array(
'table' => 'tx_cal_event',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND deleted != 1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
)
// MLC commented out to prevent duplicating URLs
/*
, 'ch' => array(
array(
'GETvar' => 'cHash',
),
),
*/
)
)
, 'fileName' => array (
'index' => array(
'index.html' => array(
'keyValues' => array(
'type' => 0,
)
)
, 'print.html' => array(
'keyValues' => array(
'type' => 98,
)
)
, 'rss.html' => array(
'keyValues' => array(
'type' => 100,
)
)
, '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,
)
)
, 'sitemap.xml' => array(
'keyValues' => array(
'type' => 200,
)
)
, '_DEFAULT' => array(
'keyValues' => array()
)
)
, 'defaultToHTMLsuffixOnPrev' => 1
, 'acceptHTMLsuffix' => 1
)
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DOMAINS'] = array (
'encode' => array (
array (
'GETvar' => 'L',
'value' => '0',
'ifDifferentToCurrent' => true,
'useConfiguration' => 'www.domain.de',
'urlPrepend' => 'http://www.domain.de',
),
array (
'GETvar' => 'L',
'value' => '1',
'ifDifferentToCurrent' => false,
'useConfiguration' => 'www.domain.com',
'urlPrepend' => 'http://www.domain.com',
),
),
'decode' => array (
'/\.de$/' => array (
'GETvars' => array (
'L' => '0',
),
'useConfiguration' => 'www.domain.de',
),
'/\.com$/' => array (
'GETvars' => array (
'L' => '1',
),
'useConfiguration' => 'www.domain.com',
),
),
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain.de']
?>
******************
I do not use the ext by Michael Cannon, I just use the conf file as a
template so to say.
ts config part:
******************
## general Language Settings
config.linkVars = L
config.uniqueLinkVars = 1
## default german
config.sys_language_uid = 0
config.metaCharset = utf-8
config.locale_all = de_DE.UTF-8
config.language = de
config.baseURL = http://www.domain.de/
[globalVar = GP:L = 0]
config.sys_language_uid = 0
config.metaCharset = utf-8
config.locale_all = de_DE.UTF-8
config.language = de
config.baseURL = http://www.domain.de/
[global]
## english
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.locale_all = en_GB.UTF-8
config.metaCharset = utf-8
config.language = en
config.baseURL = http://www.domain.com/
[global]
******************
where domain.de is my first domain pointing to german and is the
default language. the second domain.com is for english and in my
provider settings I point the webroot of the .com domain to the webroot
of the .de domain, where typo3 is installed.
btw it workz here for me without the patch provided by stefan isak
which I didn't even test as it seems to work without.
thx again to ilya and joey
rgds guido
More information about the TYPO3-english
mailing list