I want to redirect my site example.com
to https://example.com
.
I have uploaded an .htaccess
file to my server with the following code:
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [OR]
RewriteCond %{HTTP_HOST} ^example.com\.com$ [NC]
RewriteRule ^ https://example.com%{REQUEST_URI} [R=301,L,NE`
However, when I hit it to the server, it giving error on browser as it redirects you too many times.
How can I solve this?