Reputation: 13141
UPDATE: This issue was caused by Aliases. See my answer below.
I am attempting to implement a multi-site environment in Sitecore 6.5 that looks something like the following:
As you can see, there is a main site under the "Corporate" folder, and several sub-sites under the "Microsites" folder. The issue I am experiencing is that I need the sub-sites to exist within the same domain. For example:
So far, here is how I have it configured in my sites collection:
<sites>
...
<site name="subsite" hostName="mysite.com" virtualFolder="/subsite" physicalFolder="/subsite" rootPath="/sitecore/content/microsites/subsite" startItem="/home" ...
<site name="subsite2" hostName="mysite.com" virtualFolder="/subsite2" physicalFolder="/subsite2" rootPath="/sitecore/content/microsites/subsite2" startItem="/home" ...
<site name="website" hostName="mysite.com" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/corporate/" startItem="/home" ...
...
</sites>
For the most part, Sitecore is able to successfully deliver me to the sub-sites based on the virtualFolder path alone. However, the issue I am experiencing is that if I have an item with the same name in my subsite as I do in the main corporate site, Sitecore will always attempt to load the Item from the main corporate site.
For instance, say I have an item called About that exists as a child of the main site as well as in one of my sub-sites. By navigating to mysite.com/subsite/about, the URL will remain the same, however, Sitecore will serve up the About page from the main site. If the item is called AboutUs in the subsite's tree, everything works great.
Any ideas on how to work around this issue?
Upvotes: 2
Views: 1098
Reputation: 13141
OK, mystery solved... whew.
As it turns out, my site configuration was correct, however, I had Aliases set up for most of the first-level items such as About that were pointing to the main site. Removing them solved the problem. Thanks so much for your time if you were perusing this question.
Upvotes: 1
Reputation: 1408
Let me give a try:
<sites>
<site name="subsite" hostName="mysite.com" virtualFolder="/" physicalFolder="/subsite" rootPath="/sitecore/content/microsites/subsite" startItem="/subsite" ...
<site name="subsite2" hostName="mysite.com" virtualFolder="/" physicalFolder="/subsite2" rootPath="/sitecore/content/microsites/subsite2" startItem="/subsite2" ...
<site name="website" hostName="mysite.com" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/corporate/" startItem="/home" ...
</sites>
*I have not tried this code on my local machine, as I need to create this structure in my local website.
Try this and kindly let me know.
Upvotes: 1