Last active
December 16, 2021 19:45
-
-
Save MubinSayed/0e05bdd6d1599149b7be87be268f83fa to your computer and use it in GitHub Desktop.
.htaccess redirect http to https
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} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
# Successfully redirect all pages of domain from http to https: | |
# Note this will redirect using the 301 'permanently moved' redirect, which will help transfer your SEO rankings. | |
# To redirect using the 302 'temporarily moved' change [R=302,L] | |
# Ref: https://stackoverflow.com/a/27029144 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment