Я не давно ответил в листе рассылки.
Сделал точно также
?L=1 - к ссылкам не добавляется. Из-за настроек RealURL
Цитата:
array(
'GETvar' => 'L',
'noMatch' => 'bypass',
),
|
My site runs on two languages that are attached to a domain each.
Like this:
domain.dk: danish (default language)
domain.com: english
I have this configured on
www.wciom.ru
www.wciom.com
1) I put in index.php (I think possible to put this in localconf.php)
if (!isset($_GET['L'])) {
if ($_SERVER['HTTP_HOST'] == 'wciom.ru') $_GET['L']=0;
if ($_SERVER['HTTP_HOST'] == 'wciom.com'|| $_SERVER['HTTP_HOST'] == '
www.wciom.com' ) {
$_GET['L']=1;
}
}
2) TS
#-----------------------------------------------------------------------
# Language
#-----------------------------------------------------------------------
#config.sys_language_mode = content_fallback
config.sys_language_mode = strict
config.sys_language_overlay = hideNonTranslated
config.sys_language_overlay = 1
config.sys_language_softMergeIfNotBlank = tt_content:image, tt_content:header
# defining the default language
config{
sys_language_uid = 0
language = ru
locale_all = ru_RU
htmlTag_langKey = ru
}
# Setting up the language variable "L" to be passed along with links
config.linkVars = L
[globalVar = GP:L = 0]
config{
sys_language_uid = 0
language = ru
locale_all = ru_RU
htmlTag_langKey = ru
}
[global]
[globalVar = GP:L = 1]
config{
sys_language_uid = 1
language = en
locale_all = en_En
htmlTag_langKey = en
}
[global]
#--------------------------------------------------------
# RealURL
#--------------------------------------------------------
config {
baseURL =
http://wciom.ru/
}
[globalString = ENV:HTTP_HOST=*wciom.com]
config.baseURL =
http://wciom.com/
[global]
[globalVar = GP:L = 1]
config.baseURL =
http://wciom.com/
[global]
3) RealURL
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tstemplate.php'] ['linkData-PostProc'] [] =
'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['tslib/class.tslib_fe.php'] ['checkAlternativeIdMethods-PostProc'] [] =
'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables']
['tx_realurl_urldecodecache'] = 'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables']
['tx_realurl_urlencodecache'] = 'tx_realurl_urlencodecache';
$TYPO3_CONF_VARS['FE'] ['addRootLineFields'] .= ',tx_realurl_pathsegment,alias,nav_title,title';
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'init' => array(
'enableCHashCache' => 1,
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => 0,
'enableUrlEncodeCache' => 1,
'respectSimulateStaticURLs' => 0,
'postVarSet_failureMode'=>'redirect_goodUpperDir',
),
'redirects_regex' => array (
),
'preVars' => array(
/*
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'no_cache' => 1,
),
'noMatch' => 'bypass',
),
*/
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',
'expireDays' => 7,
'rootpage_id' => 1,
),
'postVarSets' => array(
'_DEFAULT' => array(
/**********************/
// news archive parameters
// news pagebrowser
'all' => array(
array(
'GETvar' => 'tx_ttnews[all]',
),
),
'ntype' => array(
array(
'GETvar' => 'tx_ttnews[typeOfNews]',
),
),
// news pagebrowser
'browse' => array(
array(
'GETvar' => 'tx_ttnews[pointer]',
),
),
// news categories
'select_category' => array (
array(
'GETvar' => 'tx_ttnews[cat]',
),
),
// news articles and searchwords
'single' => array(
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_news',
'id_field' => 'uid',
// 'alias_field' => 'title',
'alias_field' => 'uid',
'addWhereClause' => ' AND NOT deleted',
// 'useUniqueCache' => 1,
// 'useUniqueCache_conf' => array(
// 'strtolower' => 1,
// 'spaceCharacter' => '-',
// ),
),
),
array(
'GETvar' => 'tx_ttnews[swords]',
),
),
),
// '99' => '_DEFAULT',
/*******************************/
),
'fileName' => array(
'defaultToHTMLsuffixOnPrev'=>1,
'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,
),
),
),
),
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['wciom.ru'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['wciom.ru']['pagePath']['rootpage_id']= 1;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['
www.wciom.ru'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['
www.wciom.ru']['pagePath']['rootpage_id']= 1;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['wciom.com'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['wciom.com']['pagePath']['rootpage_id']= 1;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['
www.wciom.com'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['
www.wciom.com']['pagePath']['rootpage_id']= 1;
Regards,
Valery
www.typo3lab.ru