0

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".

New contributor
tarun is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • Did you specify a physicalFolder? Commented Dec 10 at 16:50

1 Answer 1

0

I have tried to configure the virtual directory of es-es and it works fine, Steps to follow:

  1. First to make sure that the ordering of the site nodes is configured in the Sitecore.config or patch file.
  2. Always have the virtual directory path first and then the domain name that are without the virtual directory.
  3. 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.
  4. 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 :)

2
  • 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.
    – tarun
    Commented Dec 12 at 12:26
  • There is already related questions , pls check it sitecore.stackexchange.com/questions/38943/…
    – Nelson
    Commented Dec 12 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.