1 2 3 4 5 6 7
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.tld$ [NC] RewriteCond %{SERVER_PORT} !=443 RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule>
You can clone a snippet to your computer for local editing. Learn more.