Home Correctly write redirect in htaccess to force https and www version of a url
 This is how I am attempting to force www and HTTPS urls in htaccess right now. RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$https://www.example.com/$1 [R=301,L]  The problem is that this still creates a redirect loop. It first redirects to https://example.com and then redirects to https://www.example.com Is there a way to correctly write this in htaccess so that it redirects to both https and www at the same time eliminating the redirect loop? I have tried many examples that I have found here on stackoverflow and they all render redirect loops. Is this unavoidable? Thanks!