Masiorama Posted December 17, 2019 Share Posted December 17, 2019 Hello there, in my shop there are 2 languages. I want to temporary deactivate one language (/en) since the translations are not ready (and I guess it will take weeks) but if I do that from the panel the remaining language has its url changed (from /it to /) which is bad. Can I temporary hide the /en version of the site with a simple htaccess rewrite, and then remove the rule once the translations are ready? Something like this should work? RewriteEngine on RewriteCond %{REQUEST_URI} en/ RewriteRule .* https://www.website.com/it/ [R=301,L,NC] # the following are just the rest of my custom rewrites section, which do work ... RewriteCond %{HTTPS} !on RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Because it doesn't. I tried also with simpler RewriteRule ^/en/ /it/ [L,R=301] Maybe they are both technically wrong, I'm not that good with apache, but I guess that something else has priority here. Any hint or workaround? Thanks in advance. Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted December 18, 2019 Share Posted December 18, 2019 could you not just simply disable the language in the back office? Then it cannot be accessed. Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 19, 2019 Share Posted December 19, 2019 You could block the language selector from showing in your theme. Link to comment Share on other sites More sharing options...
Masiorama Posted December 20, 2019 Author Share Posted December 20, 2019 On 12/18/2019 at 11:01 PM, El Patron said: could you not just simply disable the language in the back office? Then it cannot be accessed. Nope, since having just only one more language, the url would be all rewritten to / from /xx, and this is bad for SEO. @Bill Dalton I did something like you suggested, plus forced in the panel to use my primary language without checking the language browser (International -> Localization). Thanks guys. Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted December 22, 2019 Share Posted December 22, 2019 We use 'friendlydly url' modules (see addons) that allow us to suppress the default language when adding new language for clients. so the default language url never changes. Link to comment Share on other sites More sharing options...
Masiorama Posted December 23, 2019 Author Share Posted December 23, 2019 Thanks, I will look into it. 1 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