I want to be able to reach my Sitecore website from two different Hostnames, and to do so I created a new entry under <sites> in web.config; here are the code snippets (I omitted the non relevant parts):
<site name="Site1" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" hostName="mysyte.dev" />
<site name="Site2" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" hostName="mysyte.mydev" />
I have saved the config and republished the whole website just to be sure, but to no avail: if I access the second site, I get the "The layout for the requested document was not found." error, apparently generated from requesting layout {00000000-0000-0000-0000-000000000000}.
IIS is configured properly, with both hostnames mapped to the same port in the relevant website - yet only one of them works.
Am I missing something really obvious here?
EDIT: the full site entries are as follows:
<site name="Site1" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" hostName="mysyte.dev" startItem="/AppName" loginPage="/login" database="master" 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="Site2" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" hostName="mysyte.mydev" startItem="/AppName" loginPage="/login" database="master" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false"/>