【问题标题】:Joomla 2.5: How to remove the parent category from URLs?Joomla 2.5:如何从 URL 中删除父类别?
【发布时间】:2013-12-17 17:53:15
【问题描述】:


我正在尝试将我的网站从 Joomla 1.5 迁移到 Joomla 2.5。运行 RedMigrator 后,我已将所有文章导入到我的新网站中。然而,Joomla 2.5 文章的 URL 与原来的不同。特别是我想摆脱 parent 类别的 URL,使其看起来像
host/category/article
而不是:
host/parent-category/category/article
有什么方法可以从配置中做到这一点,还是我必须使用 mod_rewrite 来让我的 URL 被 Apache 重写?
谢谢!

【问题讨论】:

    标签: joomla joomla2.5


    【解决方案1】:

    根据我的经验,如果没有第三方扩展,则无法做到这一点,但您可能会尝试创建一个包含子类别博客布局项目的隐藏菜单。

    Simply remove a url segment with .htaccess

    在您的 .htaccess 文件中:

    RewriteEngine on
    RewriteBase /
    
    RewriteRule ^/parent-category/(.+)$ /$1 [L,QSA]
    

    【讨论】:

      猜你喜欢
      • 2013-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-16
      相关资源
      最近更新 更多