How to Change the Redirect page URL in Variation
Posted on 10. Dec, 2009 by admin in Articles, Sharepoint
You have Variations enabled in a SharePoint site based on English language as the main Variation label, and the 2nd Variation Label is for example French language and you want your users to be redirected to the French site whenever they type your site address instead of being redirected to the English site.
By default, the redirect page “VariationsRoot.aspx” will redirect you to the source Variation site in your portal which in my case was english which i need to change it to French.
If you create a normal redirect page, it will take 5 sec before redirecting to the French site and even if you set the time to 0 sec, the users will be able to see that a redirection happened since the redirect page will load then redirect.
The best way to solve this issue is to modify the Variation landing control page “VariationsRootLanding.ascx”
The Variation landing page is found in the following location:
“<Drive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES”
Take a backup before doing any change to this page then open it in Notepad and search for the line:
return (string.IsNullOrEmpty(matchedUrl) ? sourceLabelUrl : matchedUrl);
Replace it with the following line pointing to your page:
return “/FR/Pages/default.aspx”;
Save the control and Restart IIS then your site will be redirected to the French site automatically without showing any redirect page.
hope this helps:)
