we have multilingual (FR / EN ) website .the issue is if we test with others language in URL like www/mydomain.com/dE empty site will disply our requirement is to redirect to error page in case if langue not configured or content version is 0 .

  • You need to write a simple pipeline which will check your language iso code from url and if doesn't exist then it will redirect to error page. Commented Dec 31, 2019 at 6:50

1 Answer 1


You can simply add below code in your layout which will check if the context language is other then FR & EN and will redirect on the Error page.

    string lang = Sitecore.Context.Language.ToString();
    if(!lang.Contains("en") && !lang.Contains(""fr))
         Response.Redirect("Your error page URL");

Hope this helps.

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