There are 2 things in the requirements to understand,
If you are trying to create a language-based site ie)
example:
- /sitecore/content/TestSiteA
- /sitecore/content/TestSiteB
Using any language code like (/en or /de-de etc) next to the domain name scsalik104cm.dev.local then a new site or page should be loaded based on the configuration defined in Sitecore.config's Sites node.
Considering this is not the Sitecore item language version based resolving for the domain requirement.
- If you are trying to have a language-based Sitecore item itself in the site but not a language version item, for example in the content tree if we have Sitecore item structure like
/sitecore/content/SiteA/home/en
or /sitecore/content/SiteB/home/de-de
Then the en and de-de item will be loaded instead of the language version.
Examples of both scenarios:
I have created 2 sites, in the first site TestSiteA I created the Sitecore item named "en" under the home page, so when I try to browse the page with domainname/en then the particular Sitecore's "en" item will be resolved.
Demo:
Another example I have created the second site TestSiteB and was able to resolve this site using the virtual directory with the site name "en", so whenever I try to browse the domainname/en then the home page from the TestSiteB will be resolved.
Note The domain name will not get changed for TestSiteA and TestSiteB
Now we can both approach, now how to make this work in Sitecore,
First, update the following setting if we not considering language version-based page resolving item. This below setting will ignore "en" or "de-de" as language code.
<setting name="Languages.AlwaysStripLanguage" value="false" />
once the above setting is done then update the sites node for resolving the site.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<sites>
<site name="TestSiteB" patch:before="site[@name='website']"
hostName="scsalik104cm.dev.local"
virtualFolder="/en"
physicalFolder="/"
rootPath="/sitecore/content/TestSiteB"
startItem="/home"
database="master"
domain="extranet"
allowDebug="true"
cacheHtml="true"
htmlCacheSize="150MB"
enablePreview="true"
enableWebEdit="true"
enableDebugger="true"
disableClientData="false"
errorPage="/error"
itemNotFoundUrl="/404"
/>
<site name="TestSite" patch:after="site[@name='TestSiteB']"
hostName="scsalik104cm.dev.local"
virtualFolder="/"
physicalFolder="/"
rootPath="/sitecore/content/TestSiteA"
startItem="/home"
database="master"
domain="extranet"
allowDebug="true"
cacheHtml="true"
htmlCacheSize="150MB"
enablePreview="true"
enableWebEdit="true"
enableDebugger="true"
disableClientData="false"
errorPage="/error"
itemNotFoundUrl="/404"
/>
</sites>
</sitecore>
</configuration>
I hope this helps you :)
https://sitecore.stackexchange.com/questions/358/what-is-the-usage-of-physicalfolder-and-virtualfolder-attributes-in-a-siteco
.