Skip to content

Instantly share code, notes, and snippets.

@jlittlejohn
Last active May 1, 2019 16:02
Show Gist options
  • Save jlittlejohn/9981990 to your computer and use it in GitHub Desktop.
Save jlittlejohn/9981990 to your computer and use it in GitHub Desktop.
HTACCESS: Force HTTPS using mod_rewrite
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment