1

So, I want to customize my mappings of urls to home pages inside Sitecore

my sites home pages are nodes like this (below /sitecore/content):

/FOO/us
/FOO/ca
/FOO/..other countries
/BAR

i Want to reach them by the following urls:

mysite.com/us -> /FOO/us
mysite.com/ca -> /FOO/ca
mysite.com/bar -> /BAR

my sites declarations are like this

<site name="FOO-US" virtualFolder="/us" physicalFolder="/us" rootPath="/sitecore/content" startItem="/FOO/us" 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" />
 <site name="FOO-CA" virtualFolder="/ca" physicalFolder="/ca" rootPath="/sitecore/content" startItem="/FOO/ca" 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" />
<site name="BAR" virtualFolder="/bar" physicalFolder="/bar" rootPath="/sitecore/content" startItem="/bar" 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" />

However, i never get the expected url resolution, mostly i get 404 or get to the default Home node.

i'm testing this multi-site configuration in sitecore (6.5) in my local IIS (both 6.0 and 7.0 versions with no luck). Is that possible?

4

2 回答 2

2

您无法开箱即用,因为它们都在同一个主机名 (mysite.com) 上。如果将 startItem 设置为 FOO 并将 bar 放在其下方,则可以使其工作。那么所有三个独立的“站点”都将是根 (FOO) 的直接子级。例如

/Foo/us
/Foo/ca
/Foo/bar
于 2012-02-11T14:31:49.833 回答
0

您是否删除了默认的“网站”定义?(你可能应该)。您可以通过调整 root 和 startItem 路径来做到这一点,也许:

rootPath="/sitecore/content/FOO" startItem="/us"
rootPath="/sitecore/content/FOO" startItem="/ca"
rootPath="/sitecore/content" startItem="/bar"

或者也许(未经测试):

rootPath="/sitecore/content/FOO/us" startItem=""
rootPath="/sitecore/content/FOO/ca" startItem=""
rootPath="/sitecore/content" startItem="/bar"

如果这些只是虚 URL 而不是单独的站点,则将配置保留为一个站点并使用重定向(使用重定向模块之一)。

于 2012-03-16T11:56:53.817 回答