You can configure Sitecore to respond to requests with different home nodes based on the url.
To do so, you need to perform the following steps:
- Configure DNS appropriately.
- Add a binding in IIS for each hostname.
- Copy or rename the config file
App_Config/Include/SiteDefinition.config.example
toApp_Config/Include/SiteDefinition.config
- Modify the config file from step 3 with a new
<Site>
node for each site.
For example:
<!-- this entry will respond to http://site1.hostname.com/mysite with the /Sitecore/sites/mysite/home node -->
<site name="SiteName" patch:before="site[@name='website']"
hostName="Site1.hostname.com"
virtualFolder="/mysite"
physicalFolder="/"
rootPath="/sitecore/sites/mysite"
startItem="/home"
database="web"
domain="extranet"
allowDebug="true"
cacheHtml="true"
htmlCacheSize="50MB"
enablePreview="true"
enableWebEdit="true"
enableDebugger="true"
disableClientData="false"/>
<!-- this entry will respond to http://site1.hostname.com/mysite with the /Sitecore/sites/mysite/home node -->
<site name="SiteName" patch:before="site[@name='website']"
hostName="Site1.hostname.com"
virtualFolder="/mysite"
physicalFolder="/"
rootPath="/sitecore/sites/mysite"
startItem="/home"
database="web"
domain="extranet"
allowDebug="true"
cacheHtml="true"
htmlCacheSize="50MB"
enablePreview="true"
enableWebEdit="true"
enableDebugger="true"
disableClientData="false"/>
For more information see: https://sdn.sitecore.net/Articles/Administration/Configuring%20Multiple%20Sites/Configuring%20Sites%20in%20web,-d-,config%20File.aspx