We have two websites:
- the first one is a non-Sitecore website (e.g. www.non-sitecore-site.com)
- the second one is a Sitecore website (e.g. www.sitecore-site.com)
My task is to make the second one (Sitecore-based website) as a subsite of the first website, which is accessible via www.non-sitecore-site.com/sitecore-site.
I tried to make a virtual folder in IIS, convert it to a web application and set it up for the Sitecore-based site folder. However it does not work, even if I configure virtualFolder and physicalFolder both equal to "/sitecore-site" in Sitecore config files.
Is it actually feasible? Appreciate any help.
Sitecore resolves a site via a pipeline process within the
httpRequestBeginpipeline. TheSiteResolversets a context site based on the following criteria:Sitecore processes the config XML in sequence to find the first site matching the above criteria. Since each site has a
hostNameattribute defined, Sitecore first checks against thehostNamethen thevirtualFolderwhich by default is simply “/”. So, the first thing for you is to review a sequence of your site definitions to make sure that more specific configurations are placed on top and more generic ones - at the bottom.To configure a Sitecore site as a virtual folder simply set the
virtualFolderandphysicalFolderattributes to the same value to match your expected path '/sitecore-site', i.e. your site configuration will look like:You don’t need to create neither a physical folder 'sitecore-sit' nor a virtual folder 'sitecore-sit' in IIS pointing to your Sitecore site.