skip to Main Content

Redirect all http/www into https://www – Apache

I have this code: RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301] What this does is: With http://example.com it redirects to https://www.example.com (this is correct) With https://example.com…

VIEW QUESTION
Back To Top
Search