Jump to content

rewrite, https, and language selection


keneso

Recommended Posts

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

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated