Using .htaccess to force SSL on Apache Secure

Using these rules you can check and then force a secure connection to your site. Add the following lines to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Your .htaccess file should be in the document root directory / folder. Place the .htaccess file in the same location as your index.html or index.php.Security 869216 640


Visit sunny St. George, Utah, USA