Currently we have a one Sitecore instance on Sitecore 8.1 with 9 sites hosted using habitat framework. The site definitions are mentioned as follows:
site name="Site1" loginPage="/home" requireLogin="true" patch:before="site[@name='scheduler']"
site name="Site9" loginPage="/home" requireLogin="true" patch:before="site[@name='scheduler']"
While opening a page item of site 1 or site 2 in the experience editor, the query string for sc_site is always pointing to site9. Example: sc_lang=en&**sc_site=site9**.
Is this an expected behavior? Or is there any issue in the SiteDefinition.config
?