Created
October 9, 2019 20:40
-
-
Save SalmanRavoof/a423b3a5ed0e647b5129fd7fee363268 to your computer and use it in GitHub Desktop.
Alternative way to force any HTTP request to redirect to HTTPS by adding the first three lines to your WordPress .htaccess file.
This file contains hidden or 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 %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L,NE] | |
# Please make sure to replace the example.com domain name in line 3 with your own | |
# BEGIN WordPress | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment