Skip to content

Instantly share code, notes, and snippets.

@garyconstable
Created January 2, 2019 09:51
Show Gist options
  • Save garyconstable/6d589cea487120221865a9a219377a5e to your computer and use it in GitHub Desktop.
Save garyconstable/6d589cea487120221865a9a219377a5e to your computer and use it in GitHub Desktop.
HTACCESS - But not for localhost

Enable HTTPS but not for the localhost.

RewriteCond %{HTTP_HOST} !violet.loc
RewriteCond %{HTTPS}  !=on 
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment