Sitecore enables accessing child node around parent

后端 未结 5 1502
暗喜
暗喜 2021-01-26 04:14

I have a sitecore multisite setup.

i\'m currently struggling with the \"duplicate content syndrome\" were google bots indexes my sites and is able to access the content

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-26 05:02

    Sitecore has a number of issues with multi-site link generation, some of which have been addressed in the latest release of 6.6: http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog/Release%20History%20SC66.aspx#660update6 (look for the section on changes to the Link Provider).

    It is also reasonably simple to add a few extra safeguards against cross site noise such as this. You could add a step after the ItemResolver in the httpRequestBegin pipeline along something like this (sorry, bit pressed for time to write up a compileable example, this should give the idea though):

    Item siteRoot = Sitecore.Context.Site.StartItem;
    if (!(Sitecore.Context.Item.ID == siteRoot.ID || Sitecore.Context.Item.Axes.IsDescendantOf(siteRoot))
      // break and do 404
    

提交回复
热议问题