Contact Us

One may often be required to configure their website with virtual folders instead of using language code. Specifically, this need may arise when for instance, one is running their website in the EN-US language setup but at the same time want to configure their homepage with the URL " https://hostname/en " instead of " https://hostname/en-us " or " https://hostname/e ".

In such a scenario, it becomes imperative to use virtual folders. The following steps within Sitecore will enable you to seamlessly configure your website with virtual folders.

Follow these steps to configure your website with virtual folder.

Step 1:

Navigate to your Sitecore. Go to Content/Tenant/Site/Settings node/Site Grouping/WebsiteSiteDefinition item in Sitecore. Update the necessary site definition field values including Site Name, Target Hostname, Host Name, Virtual Folder, Start Item, Database, and Language as shown below.

Sitecore SXA Configure Host Name

Sitecore SXA Host Name

Step 2:

Once you have successfully updated the field values, move on to:

Open App_Config\Sitecore.config file and locate to below setting. By default value of "Languages.AlwaysStripLanguage" is true. You have to make it false. Now you are all set to run your website with virtual folder and the url below will not go to 404 page - show any error.

<setting name="Languages.AlwaysStripLanguage" value="false" />

https://hostname/es

 

These small, yet impactful changes are likely to shape and possibly transform the website perception by adding a certain degree of credibility, reliance, and trustworthiness to your overall digital consumer experience. For more Sitecore related queries get in touch with us and our team will get back to you.

Need Help?