I am trying to add es-es
as Virtual folder but its going to error page.
Any way to add es-es
as virtual folder or any customization we can do in Site resolver to make sitecore accept Virtual folder value as "es-es"
.
1 Answer
I have tried to configure the virtual directory of es-es and it works fine, Steps to follow:
- First to make sure that the ordering of the site nodes is configured in the Sitecore.config or patch file.
- Always have the virtual directory path first and then the domain name that are without the virtual directory.
- I could see that the es-es is a language code as by default Sitecore will consider it as language code and it will try to resolve the item in that language(es-es). In your case, it might try to access the home page item in the es-es language version.
- If you want to use language code as a virtual directory, try updating the following Sitecore setting, which will help Sitecore not to consider es-es as language code.
<setting name="Languages.AlwaysStripLanguage" value="false" />
Site definition sample:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<sites>
<site name="TestSiteB" patch:before="site[@name='website']"
hostName="sc.dev.local"
virtualFolder="/es-es"
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"
/>
<site name="TestSite" patch:after="site[@name='TestSiteB']"
hostName="sc.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"
/>
</sites>
</sitecore>
</configuration>
I have answered a similar kind of question in the below link
Use Language code as Virtual Path In Sitecore Site Definition
I hope this helps you :)
-
what will be impact of this setting on other sites. <setting name="Languages.AlwaysStripLanguage" value="false" /> And is there way to enable this setting for particular site.– tarunCommented Dec 12 at 12:26
-
There is already related questions , pls check it sitecore.stackexchange.com/questions/38943/…– NelsonCommented Dec 12 at 13:32
physicalFolder
?