替换url组件/content/..到MyMenu/MyCategory/


Replace url component/conten/.... to MyMenu/MyCategory/

我有一个joomla网站,有4个菜单项,其中一个是针对学习的教育,还有一些文章。

对于我的模板设计:在其他3个菜单中,我禁用了#contents。只有在education菜单中,用户才能看到#contents

例如,当用户打开education菜单时,他/她可以选择一篇文章并阅读。education中的文章有这样的链接:http://www.fotografy.ir/education/2-uncategorised/20-11。但当用户搜索这篇文章时,在搜索内容中,这篇文章有不同的url,比如:http://www.fotografy.ir/component/content/article/2-uncategorised/20-11?Itemid=101

这篇文章将加载在组件/内容。。。其中我禁用了#contents我不想在里面装东西。我该怎么解决这个问题?

您可以在joomla中使用.htaccess和apache重写功能。

  1. 在根joomla文件夹中将文件htaccess.txt重命名为.htaccess
  2. 在joomla管理区域的全局配置中启用Apache重写

此外,您还可以尝试一件事:

转到backend -> Menus -> Add new menu item ->在这里你可以创建一个带有标题和别名的菜单项,别名显示在url中。(或)

像这样试试Goto backend -> System -> Global configuration -> Turn on the sef url

我希望它能帮助你:)