Created
February 16, 2023 12:13
-
-
Save ravismakwana/c9a041195d8d30c0550f1efb742a200b to your computer and use it in GitHub Desktop.
This code is used to redirect 'http' to 'https' in WordPress.
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
/* Add this code at the top of the .htaccess file */ | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on [NC] | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment