【问题标题】:codeigniter making duplicating pages with #! include in link of each pagecodeigniter 使用 #! 复制页面包含在每个页面的链接中
【发布时间】:2019-02-13 10:43:49
【问题描述】:

我在 CodeIgniter 上的网站上有一个问题。

所有链接都在复制每个链接,并在 URL 中包含 #! 例如 https://www.example.com/port-of-portsmouth 链接到我网站上的一个页面,该页面与下面的链接一样重复

https://www.example.com/port-of-portsmouth#!

两个链接具有相同的页面内容。如何摆脱此错误以避免内容重复

【问题讨论】:

标签: .htaccess codeigniter url


【解决方案1】:
How to get rid of this error to avoid content duplication

你不能

因为# 被用作fragment identifier。例如,如果 URL 是 https://example.com/#data,这意味着打开 example.com 并跳转到 id 为“data”的页面的特定部分

查看此网址,https://jestjs.io/docs/en/cli.html#cache 当您打开页面时,它会跳转到cache 部分。

因此,基本上,您的内容不会重复,它只是打开同一个页面,然后浏览器尝试导航到 id !,它可能不存在,因此没有什么特别的事情发生。

【讨论】:

  • 好的,但是像 ahrefs 这样的一些 SEO 工具的行为与 #!并且没有 #!两者都是不同的页面,
  • 你能告诉我,页面有什么不同吗?应该是同一页
猜你喜欢
  • 2011-06-04
  • 2014-08-22
  • 1970-01-01
  • 2013-04-27
  • 1970-01-01
  • 2010-12-03
  • 1970-01-01
  • 1970-01-01
  • 2012-09-18
相关资源
最近更新 更多