如何使用.htaccess隐藏url的部分

如何使用.htaccess隐藏url的部分,.htaccess,mod-rewrite,joomla,rewrite,.htaccess,Mod Rewrite,Joomla,Rewrite,我正在尝试从我的url中删除该部分,这里是url“http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/itemlist/category/3-category-2“ 现在我想从url中删除“itemlist/category/”,这样url就可以看起来像链接了http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/3-category-2

我正在尝试从我的url中删除该部分,这里是url“http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/itemlist/category/3-category-2“

现在我想从url中删除“itemlist/category/”,这样url就可以看起来像链接了http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/3-category-2“

我正在使用joomla的默认功能,即SEF URL,我需要进一步简化它,因为我是htaccess的新手

请提供学习如何为.htaccess文件编写规则的链接


请帮助

最简单的事情就是在某个地方创建一个直接指向类别2的菜单链接。这将正确设置url。它还将消除3-

您需要在组件中编辑router.php以实现此功能