我想在我的网站中使用扩展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;
?> 我删除了我不想在url中的页面,并且删除了所有的条目,我注意到url被更改了,但是页面不再被选择了。我把这三个暗处都冲了。提前谢谢你。编辑:这是我的url https://www..com/en/blog/blog/article/,我去了第一个博客,把它从说url中取出,第二个我设置它来覆盖整个页面路径,在文章中我也排除了它,然后我从文章中删除了所有条目,然后这个链接很好:https://www..com/en/blog/article/,但这个链接不是:https://www。*.两个博客页面中的扩展: URL冲突检测到:'en/ blog /‘也用于页面: 865 (/Home/Blog) URL冲突检测到:'de/blog/’也用于页面: 722 (/Home/Blog/Blog)
发布于 2018-01-08 10:32:34
要使用TYPO3 RealURL扩展,您需要使用下面的配置。
在setup.ts中添加下面的打字本。
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1如果根目录中没有.htaccess文件,那么添加它。
检查您的apache配置,如果mod_rewrite未启用,则启用它。
为linux启用下面的命令mod_rewrite。
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',
),https://stackoverflow.com/questions/48148285
复制相似问题