0
votes

We have a multisite SiteCore setup with 2 sites within the same .Net solution.

This works by setting the rootPath property on a Site Definition in web.config to limit the site to part of the SiteCore folder structure.

This works well apart from when pages are created with the same name as in the other site then it's serving content from the other site! We have inherited a fair bit of custom code in this solution form the other site so this may be the cause but dont know what Im looking for ...

Thanks

2
Post your site definitions pleaseMark Ursino

2 Answers

0
votes

How are you referencing the sites? Do they each have their own host name? Do you have the "hostName" property set for the site node in the Site Defintion?

I will assume that you are not referring to them this way and instead, the sites are using the "virtualFolder" property. If both sites have the same default value of "/" for virtualFolder, attempting to get to either site will result in Sitecore rendering the first site that it matches on, which would be the site listed first.

Try putting the actual site name for "virtualFolder" and "physicalFolder" (e.g. "Site1" and "Site2", respectively). Then you can address your sites as http://yourserver.com/Site1 and http://yourserver.com/Site2. The "virtualFolder" will match first and render the correct site.

See Configuring Sites in the web.config File on SDN for additional information.

Hope this helps.

0
votes

It turns out this is happening in this case because of a System alias that is redirecting for a subset of pages