1

I am forcing my webserver to rewrite a none www URL to www, e.g. https://example.com to https://www.example.com, via .htaccess.

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

But my site does not load with www and prints ERR_TOO_MANY_REDIRECTS.

If I enter a URL like https://www.example.com/some-uri then I get redirected to https://example.com

DNS Zone Records DNS Zone Record

What might be the cause?

MrWhite
  • 13,315
Black
  • 501

1 Answers1

3

I was able to solve the problem. It was a magento setting.

There is a setting in system->configuration->Web->Url Options->Auto-redirect to Base URL. Set that to 'No'.

Black
  • 501