We have decided to remove one of the languages we were using in Guide (fr fr) and redirect to ca fr. I put some custom code loosely based on option 2 in this article https://support.zendesk.com/hc/en-us/articles/4408886627866-Redirecting-traffic-from-deleted-help-center-articles but it automatically reroutes back to the english version of the articles, which is our default language. Is there a way to get around this as I want the transition to be as seamless as possible when going from one version of french to the other. Here is the code I am using:
if (window.location.href.indexOf("/fr-fr/") > -1) {
var newURL = window.location.href.replace("/fr-fr/", "/fr-ca/");
window.location.href = newURL;
}