keneso Posted April 11, 2015 Share Posted April 11, 2015 Hi, I tried to add rewrite rule to my htaccess for site.com, and http://www.site.com RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] But by doing that the language selection does not work, reloading the default (English) language, and the https is not reachable anymore. What would be the correct rewrite to use, as you can guess I am not a coder. On a side note I noticed that whenever changing page I have to reselect the language for that page, is there a way that once user selects a language this wouldn't change while surfing thru the site? Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 11, 2015 Share Posted April 11, 2015 try using... RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] the language shouldn't change when browsing the site... unless you were possibly specifying a language in the URL... 0 Quote Link to comment Share on other sites More sharing options...
keneso Posted April 11, 2015 Author Share Posted April 11, 2015 Thank you. The code you provided works fine, but it won't let language change. As for the side note it was a cahce issue, as I cleared the cache it behaves correctly. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 11, 2015 Share Posted April 11, 2015 The code you provided works fine, but it won't let language change. it runs fine on our dev site and allows language to be changed without a problem... perhaps your server config is slightly different than ours. 0 Quote Link to comment Share on other sites More sharing options...
keneso Posted April 12, 2015 Author Share Posted April 12, 2015 Thanks. I'll ask the server guys. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.