ro-bo Posted December 4, 2015 Share Posted December 4, 2015 Hi everyone. I'm working on a site where only a few pages are multilingual. The default language is German. Some pages should be available in English. Only these pages have a language switcher, depending on whether the english language is activ in the settings for this page. Nearly everything works fine but if I switch from an page where English language is active to another page where only german language (default) is activated (by page settings) the URL and $user->language is still english although the page should only be available in German. I think that leads to double content in Search Engines and other problems in Page view (e.g. some fields in Template have English Content and others are only german). What's the best approach for this issue? I currently have it resolved like this: if (!$page->viewable($user->language)) { $user->language = $languages->get('default'); $session->redirect($page->url, false); } How would you do that?Just by the way: Would the HTTP 302 redirect be OK in this context or is it better to send a HTTP 301 redirect? Thanks in advance! Robert Link to comment Share on other sites More sharing options...
LostKobrakai Posted December 4, 2015 Share Posted December 4, 2015 To prevent double content penalty in search engines just supply a canonical link in the head of the page, if the current page is not available in english. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now