Redirect HTTP to HTTPS in Apache


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

Redirect HTTP to HTTPS in Apache


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

URL: https://kinsta.com/knowledgebase/redirect-http-to-https/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.