asp.net - Sitecore Multiple Site Set up..host names -


so trying set in sitecore handle multi site set 2 different host headers. no matter reverts default site either host header.

so @ moment default in web config follows :

<site name="website" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content" startitem="/home page" database="web" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10mb" registrycachesize="0" viewstatecachesize="0" xslcachesize="5mb" filtereditemscachesize="2mb" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" hostname="localhost" loginpage="/account/sourceloginrouter" /> 

and new 1 trying add in then

<site name="smartemea" hostname="secondsite" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content/smartemea" startitem="/home" database="master" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10mb" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" language="nl-nl" customlinkmanager="valtechlinkmanager"/> 

and host file follows

127.0.0.1       localhost 127.0.0.1       secondsite 

but no matter reverts website , rootpath of /sitecore/content

you must make sure "website" <site ... /> node last of of configured sites. "website" node acts catch-all. request come in, goes down <site ... /> nodes , matches against each hostname until find site run. if have "website" first, run since catches on host.

e.g.

<site name="smartemea" hostname="secondsite" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content/smartemea" startitem="/home" database="master" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10mb" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" language="nl-nl" customlinkmanager="valtechlinkmanager"/> <site name="website" virtualfolder="/" physicalfolder="/" rootpath="/sitecore/content" startitem="/home page" database="web" domain="extranet" allowdebug="true" cachehtml="true" htmlcachesize="10mb" registrycachesize="0" viewstatecachesize="0" xslcachesize="5mb" filtereditemscachesize="2mb" enablepreview="true" enablewebedit="true" enabledebugger="true" disableclientdata="false" hostname="localhost" loginpage="/account/sourceloginrouter" /> 

Comments