Skip to content

Instantly share code, notes, and snippets.

@Hexodus
Last active July 27, 2017 11:07
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 Hexodus/b55c5fadb39b2e1daa4d54f5dec82f37 to your computer and use it in GitHub Desktop.
Save Hexodus/b55c5fadb39b2e1daa4d54f5dec82f37 to your computer and use it in GitHub Desktop.
Force SSL for Wordpress via htaccess. Works for both single Blogs or Multisite. Just add below RewriteEngine On RewriteBase / #Force SSL code here On shared hosting it could produce to much redirections - when you convert from http to https. So it's better to rewrite all url's first (but after switching ssl on your hosting on) to reduce them. Th…
#Force SSL
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment