How to redirect users to the right site when using variations?
-
07-10-2020 - |
문제
I am currently using SharePoint 2013 On-Premise and I have enabled the Variations in a site collection.
Under the site collection, three sub sites are created for each language. My question is: how can I redirect the user to the right language when he/she visits the site? Does SharePoint handle this based on user's Browser settings, do I have to write any custom code to handle redirection or configure something in web.config?
Edit
I have changed the language in the browser to French, but I am still not redirected to the French site when I visit my site: http://dev/sites/heli
,for example.
해결책
When you enable variations in your site collection, there is a file created in the pages Library called: VariationRoot.aspx
. When you open this file, you will be redirected to the write site.
You have to set this page as your home page, so that everytime a user visits your site, he will be redirected to the correct site.
You can set it has homepage either in 1) SharePoint Designer
or you can use 2) PowerShell
.
I hope this will help you.
다른 팁
Redirect is based on users browser settings (out of the box) but this behaviour can be overridden based on users profile language preferences (require customization)
You can try this:
- https://social.msdn.microsoft.com/Forums/vstudio/en-US/c2c8d72d-45f0-4c34-936d-3bdabec68b14/autoredirect-to-self-enrollment-portal-when-logging-into-site-protected-with-multi-factor?forum=windowsazureactiveauthentication
- https://social.technet.microsoft.com/Forums/sharepoint/en-US/20b5793a-cfeb-4105-956c-a0302676c8ea/redirect-to-user-to-particular-subsite-based-upon-view-only-permission-on-parent-site-?forum=sharepointgeneralprevious
- https://social.msdn.microsoft.com/Forums/sharepoint/en-US/7915acd4-8240-4cc2-8465-fdb8811d7529/workflow-to-redirect-user-to-another-page
I guess there's no other way, you will need to code.
Bests Regards!