I host two sites in a single sitecore environment.
I’ve modified web.config so that
<site hostName="subdomain1.domain.com" startItem="/home" ... />
<site hostName="subdomain2.domain.com" startItem="/SecondSite/Homepage" ... />
The problem is that menu links I generate in xslt rendering using sc:path(.) are too long.
http://subdomain2.domain.nl/sitecore/content/SecondSite/CaptivatingPage.aspx
I want the links look like
http://subdomain2.domain.nl/CaptivatingPage.aspx
Please, give me a hint.
The true root of the site is SiteRoot + StartItem, thus in your case it is
/sitecore/content/SecondSIte/Homepage. The page you generate a link to in your XSL rendering is not under the root of the site – it is the same level as the Homepage.sc:path(.)should give you a friendly link, and for each page under the Homepage it will behttp://subdomain2.domain.nl/EachPage.aspx, but for the items outside the root it will concatenate it with the full path:/sitecore/content/blabla...So, try to move CaptivatingPage under the Homepage, and you’ll get what you expect.