【问题标题】:Sitecore 6.5 urls across multiple sites/domains (not resolving sites?)Sitecore 6.5 跨多个站点/域的 URL(不解析站点?)
【发布时间】:2013-02-05 18:02:59
【问题描述】:

我正在使用包含多个站点的 Sitecore 安装。当从 example1.com (/sitecore/content/example1) 链接到 example2.com (/sitecore/content/example2/about) 下的项目时

Sitecore 没有为任何跨域链接正确生成链接。它正在生成: http://www.example1.com/example2/about.aspx 这是预期的: http://www.example2.com/about.aspx

当链接到 example1.com 或该站点下的任何项目时,example2.com 也会发生同样的事情。

  • 两个站点都在 web.config 中定义。

  • 根节点都是“/sitecore/content”

  • 起始项分别为“/example1”和“/example2”。

  • Rendering.SiteResolving 设置为 true

  • Rendering.SiteResolvingMatchCurrentSite 设置为 false

  • 我正在使用 sc:link 生成链接。

  • Sitecore.Links.LinkProvider 的 alwaysIncludeServerUrl 设置为 true

【问题讨论】:

    标签: web-config hyperlink sitecore


    【解决方案1】:

    如果您使用带有通配符的主机名(例如“www.example1.com|example1.com”),您需要在条目中设置 targetHostName="www.example1.com"。

    即使您只有一个域,也要设置 targetHostName,因为有一个东西/功能只查看 targetHostName。例如。在没有 targetHostName 和 6.5.0 版本的情况下,GetItemUrl() 无法按计划工作。 120706 它不考虑 web.config 中设置的内容。这是一个错误,他们希望在未来的版本中修复。如果您遇到问题,请在此处寻找解决方案: http://sitecorepm.wordpress.com/2010/08/04/using-cross-site-links-dynamic-links/

    【讨论】:

      【解决方案2】:

      您是否在 web.config 中设置了 条目的主机名值?

      <site name="example1" hostName="www.example1.com" ... />
      <site name="example2" hostName="www.example2.com" ... />
      

      这里有一篇非常好的博客文章:http://blog.paulgeorge.co.uk/2011/05/01/sitecore-linkmanager-inside-out-muti-site-and-sub-site-setups/ 看起来你已经涵盖了完成这项工作所需的所有其他内容。

      【讨论】:

        猜你喜欢
        • 2018-09-04
        • 2011-04-26
        • 2012-08-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-08-02
        • 1970-01-01
        相关资源
        最近更新 更多