Force HTTPS for WordPress Installations

Just add this snippet to the beginning of your rewrite section of your .htaccess file to force HTTPS:

As you can see, I placed it directly under “RewriteEngine On”.

Or you can also  use this Snippet to force HTTPS for your application:

Force HTTPS behind a proxy

If you are behind a proxy or a FPC (Varnish f.e.), you have to change the rewrite condition as shown below to force HTTP:

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.