×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Tommaso Vietina
Added: Jan 28, 2022 11:28 AM
Views: 396
Tags: no tags
  1. RewriteEngine On
  2. RewriteCond %{HTTPS} off
  3. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  4. RewriteCond %{HTTP_HOST} !^www\.
  5. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]