【问题标题】:Why Joomla shows contents with any URL?为什么 Joomla 显示任何 URL 的内容?
【发布时间】:2016-12-02 21:16:09
【问题描述】:

当我在 google 中搜索以进行测试时,我在我的 Joomla 3.6.4 网站中发现了一个错误。 例如,我有一个 ID 为 34 和别名 myalias 的内容 现在出乎意料的是,以下所有 URL 都加载了我的内容:

http://example.com/test-test-test/34-myalias
http://example.com/mytest/34-myalias
http://example.com/hellowwwwwwwwwwwww/34-myalias
http://example.com/aything/34-myalias

等等。 这根本不是真的!!内容必须仅在我预定义的菜单项中加载。例如,我在菜单管理器中分配了一个新的菜单项,例如 definedmenu 女巫显示内容 34。所以下面的网址应该只适用:

http://example.com/definedmenu/34-myalias

有什么问题。这对我的网站 SEO 不利... 谢谢。

【问题讨论】:

    标签: joomla routing joomla3.0


    【解决方案1】:

    http://example.com/index.php?option=com_content&view=article&id=34&name=ram&age=30 这里

    http://example.com/index.php is a base url
    

    和

    option=com_content&view=article&id=34&name=ram&age=30
    

    这些是输入变量

    当我们将 url 更改为 SEO url 时

    http://example.com/index.php/content/article/34/ram/30
    

    所以

    http://example.com/test-test-test/34-myalias
    http://example.com/mytest/34-myalias
    http://example.com/hellowwwwwwwwwwwww/34-myalias
    http://example.com/aything/34-myalias
    

    "test-test-test" 视为输入变量 "mytest" 视为输入变量

    但是每个组件在组件路由上都有一些限制,内容是“id-alias”格式所以“34-myalias”但是这里id很重要

    http://example.com/test-test-test/34-myaliasdfdfdfd it will work
    
    http://example.com/test-test-test/34-sdsdsdmyalias it will work
    

    但是

    http://example.com/test-test-test/sdsd34-myalias it will not work
    

    【讨论】:

    • 我知道这一点。但是解决方案是什么?!
    【解决方案2】:

    这就是为什么许多人转向像 SEO 组件这样的原因

    RSSEO! https://www.rsjoomla.com/joomla-extensions/joomla-seo.html

    或

    sh404SEFhttps://weeblr.com/joomla-seo-analytics-security/sh404sef

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-08
      • 1970-01-01
      相关资源
      最近更新 更多