Sitecore的身边能够访问父子节点 [英] Sitecore enables accessing child node around parent

查看:202
本文介绍了Sitecore的身边能够访问父子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多点Sitecore的设置。

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 of the opposite site.

这意味着它发现在2个不同的主机名相同的内容这给网站在谷歌搜索更低的评级。

this means it finds the same content on 2 different hostNames which gives the sites a lower rating in a google search.

它找到重复内容的原因是,我能够访问该网站oppsosite一个比我目前通过在URL中键入名称浏览一个子节点。

The reason it finds duplicate content is that i am able to access a child node on the oppsosite site than the one i'm currently browsing by typing the name in the URL.

这是我的站点web.config中设置:

This is my web.config setup of the sites:

< 网​​站名称=网站2主机名=local.domain.dkvirtualFolder =/> physicalFolder =/ROOTPATH​​ =/ Sitecore的/内容/谈话起始物品=/数据库=网域=外网allowDebug =真cacheHtml =真htmlCacheSize =10MBregistryCacheSize =0viewStateCacheSize =0xslCacheSize =5MBfilteredItemsCacheSize =2MB启用preVIEW =真enableWebEdit =真enableDebugger =真disableClientData =假/>

<site name="website2" hostName="local.domain.dk" virtualFolder="/" >physicalFolder="/" rootPath="/sitecore/content/talk" startItem="/" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false"/>

&LT; 网​​站名称=网站virtualFolder =/physicalFolder =/> ROOTPATH​​ =/ Sitecore的/内容/家的起始物品=/数据库=网域=外网allowDebug =真cacheHtml =真htmlCacheSize =10MBregistryCacheSize =0viewStateCacheSize =0xslCacheSize =5MBfilteredItemsCacheSize =2MB使preVIEW =真enableWebEdit =真enableDebugger =真disableClientData =假/>

<site name="website" virtualFolder="/" physicalFolder="/" >rootPath="/sitecore/content/home" startItem="/" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false"/>

虽然我设置了ROOTPATH​​到每个站点的根目录下,我仍然可以通过键入local.domain通话/集成访问local.domain.dk/ydelser/integration的子节点。

Even though i set the rootpath to the root of each site, i am still able to access the child node of local.domain.dk/ydelser/integration by typing local.domain-talk/integration.

任何帮助将是非常美联社preciated!

Any help would be much appreciated !

推荐答案

您需要确保已经设置了主机名 targetHostName &LT属性;网站&GT; 配置。当你链接到网站之间的内容链接会呈现出完整的URL包括主机名,这将保证。

You need to make sure you have set the hostName and targetHostName attribute in your <site> configuration. This will ensure when you link to content between sites the link will render out the full URL including hostname.

hostName: The host name of the incoming url. May include wildcards (ex. www.site.net, *.site.net, *.net, pda.*, print.*.net)
          It's possible to set more than one mask by using '|' symbol as a separator (ex. pda.*|print.*.net)
targetHostName: The host name to use when generating URLs to items within this site from the context of another site.
          If the targetHostName attribute is absent, Sitecore uses the value of the hostName attribute instead.
          Used only when the value of the Rendering.SiteResolving setting is true.

和确保 Rendering.SiteResolving = TRUE

  <!--  SITE RESOLVING
        While rendering item links, some items may belong to different site. Setting this to true
        make LinkManager try to resolve target site in order to use the right host name.
        Default value: true
  -->
  <setting name="Rendering.SiteResolving" value="true" />

您始终能的完整路径来访问一个页面,从而延斯说,在添加规范链接标签。一旦你解决了跨站点联和规范链接的问题,那么谷歌的机器人应该奥菱是继干净的链接。

You will always be able to access a page with the full path, so as Jens says add in canonical link tags. Once you've resolved the cross site linking and canonical links issue then the google bots should oly be following clean links.

这篇关于Sitecore的身边能够访问父子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆