Created
August 2, 2023 06:38
-
-
Save sumonst21/8d3187468aad72cf8816e00306af3720 to your computer and use it in GitHub Desktop.
mod_rewrite - 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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on [NC] | |
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment