Skip to content

Instantly share code, notes, and snippets.

@utopianfool
Created August 28, 2020 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save utopianfool/f9500011844f740cb64f2c33855cce92 to your computer and use it in GitHub Desktop.
Save utopianfool/f9500011844f740cb64f2c33855cce92 to your computer and use it in GitHub Desktop.
Force https in .htaccess file
# Force https
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment