Force HTTPS with mod_rewrite


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. RewriteEngine on
  2. RewriteCond %{HTTPS} !On
  3. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.