Prestashop second store redirects to main when www. is used

275 Views Asked by At

good afternoon everyone,

I have a multistore with 3 stores. Unfortunately www.domain.nl refers to the main domain and domain.nl does not go to the right shop. Now I had a solution for that in the past, which is:

RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

However, if I now put this in the htaccess, the sites all give a "To many redirects error"

I can't figure it out and ask for your help.

1

There are 1 best solutions below

0
Tim Bronsgeest On

I have found finaly the solution:

To redirect from www. to non www use below in your htaccess.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]