Created
October 9, 2019 20:36
-
-
Save SalmanRavoof/94ca7a072caf0578c5c517d9ca72946f to your computer and use it in GitHub Desktop.
Force any HTTP request to redirect to HTTPS by adding the first three lines to your WordPress .htaccess file. Never put it in between the WordPress tags.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] | |
# BEGIN WordPress | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment