Skip to content

Instantly share code, notes, and snippets.

@raewrites
Last active April 12, 2018 14:29
Show Gist options
  • Save raewrites/5760b23cb3000778d97ea8e7159f123a to your computer and use it in GitHub Desktop.
Save raewrites/5760b23cb3000778d97ea8e7159f123a to your computer and use it in GitHub Desktop.
WordPress HTTPS Redirect
# Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment