我有问题。有人知道如何从网址中删除新闻前缀吗?
就像这样
http://www.example.com/**news**/detail/title-of-news/
我希望像这样
http://www.example.com/detail/title-of-news/
或用不同的"文章"替换新闻词。例如。
答案 0 :(得分:1)
article
页面fixedPostVars
(来自RealURL文档)缩短网址read this answer以查看tt_news
的示例(抱歉,我现在没有任何针对News + RU的示例,但调整此问题没有问题):样品:
'fixedPostVars' => array(
'123' =>array(
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
),