我想在我的网站中使用扩展程序RealURL,我将其安装在扩展程序中,这是我的配置文件:
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
'_DEFAULT' => array (
'init' => array (
'enableCHashCache' => '1',
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => '1',
'enableUrlEncodeCache' => '1',
'emptyUrlReturnValue' => '/',
),
'redirects' => array (
// 'de/aerzte.html' => '/?id=51&L=3',
'support.html' => 'go/support-active'
),
'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => '1',
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '3',
'en' => '0',
'fr' => '6',
// '_DEFAULT' => '0',
),
'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' => 3,
),
'fixedPostVars' => array (
),
'postVarSets' => array (
'_DEFAULT' => array (
// EXT:news start
'news' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
),
array(
'GETvar' => 'tx_news_pi1[controller]',
),
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_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' => 'l10n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
),
),
),
// EXT:news end
),
),
'fileName' => array (
//
// if you don't want .html-URLs set the following to "false" (e.g. 'defaultToHTMLsuffixOnPrev' => false,)
// then you get http://www.yourdomain.com/imprint/ instead of http://www.yourdomain.com/imprint.html
//
'defaultToHTMLsuffixOnPrev' => false,
'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',
),
),
),
),
),
);
$domains = array(
'_DEFAULT' => '3',
);
foreach ($domains as $domain=>$pid) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]['pagePath']['rootpage_id'] = $pid;
}
//$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.****.com']['pagePath']['rootpage_id'] = 3;
?>
我在网址中排除了我不想要的页面,我删除了所有条目,我注意到网址已被更改,但页面不再打开了。 我冲了三个缓存。 先感谢您。 编辑:这是我的网址 https://www。的 的.com / EN /博客/博客/条/ 我去了第一个博客,并从说话网址中排除了它 第二个我设置它来覆盖整个页面路径 在文章中我也从发言URL中排除了它 然后我去了文章条目并删除了所有这些条目 然后这个链接工作正常: https://www。的 的.com / EN /博客/条/ 但这不是: https://www。***。com / EN /博客 我在两个博客页面的扩展中都得到了这个: 检测到URL冲突:'en / blog /'也用于页面:865(/ Home / Blog) 检测到URL冲突:'de / blog /'也用于页面:722(/ Home / Blog / Blog)
答案 0 :(得分:0)
要使用TYPO3 RealURL
扩展程序,您需要使用以下配置。
在setup.ts中添加下面的typoscript。
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1
如果根目录中没有.htaccess
文件,则添加它。
检查您的apache配置,如果mod_rewrite
未启用,则启用它。
启用mod_rewrite
以下命令用于linux。
a2enmod rewrite
service apache2 restart
使用以下realURL配置。
'fixedPostVars' => array(
'newsDetailConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => array(
'detail' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => array(
'News' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_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' => 'l10n_parent',
'expireDays' => 180,
)
)
),
'blog-page-id' => 'newsDetailConfiguration',
),