10

Our site is resolving some relative urls as languages, where it should be resolving items instead.

e.g. mydomain.com/eu should be resolving the item EU under the home item. Instead, Sitecore is resolving the home item with the language as Basque (EU)

What is an effective way to prevent this from happening?

2
  • Are you also running your site multilingual that you want to work for some languages? Or do you want all language-interpretation removed from URLs?
    – Kasaku
    Sep 23, 2016 at 14:51
  • There is only one language on the site
    – Dan
    Sep 23, 2016 at 14:56

1 Answer 1

14

If you don't want FilePath based language resolving, simple do below setting in Sitecore.config:

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

This will do nothing but ignoring the StripLanguage processor from preprocessRequest pipeline.


By default first item (after domain name), Sitecore checks whether it's a language or not. If it's a registered language of .NET, Sitecore will consider it a language, else will consider it as an Item inside Home. So, above configuration should fix your issue.

4
  • 3
    Make sure you patch this, don't edit the sitecore.config directly
    – Richard Seal
    Sep 23, 2016 at 15:01
  • Do you mean Web.config?
    – Dan
    Sep 23, 2016 at 15:05
  • Yeah, in Web.config for older versions. After sc 8, it's Sitecore.config Sep 23, 2016 at 15:06
  • 1
    To Richard's point:Patching is a best practice so you don't break the upgrade path. Everytime you need to change a sitecore out of the box configuration make sure you patch that. You can find more information on patching here: sitecore-community.github.io/docs/documentation/…
    – Diego
    Sep 23, 2016 at 16:25

Your Answer

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

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