Skip to content

Instantly share code, notes, and snippets.

@dbrax
Created April 7, 2021 10:59
Show Gist options
  • Save dbrax/e582d03f243dc31dd7f483fa0411d39d to your computer and use it in GitHub Desktop.
Save dbrax/e582d03f243dc31dd7f483fa0411d39d to your computer and use it in GitHub Desktop.
Forcing https on .htaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
See more on https tricks here: https://hostnasi.com/index.php/knowledgebase/5/-SSL-Certificates-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment