Last active
April 26, 2021 07:38
-
-
Save janzikmund/258966b35cf3c7dc20ccaa52ce6dd4a8 to your computer and use it in GitHub Desktop.
redirect-non-www-http-to-www-https.htaccess
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
# Redirect from non-www or http to https www | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# exclude acme challenge urls from rewriting to not mess Let's Encrypt | |
RewriteRule ^\.well-known\/acme-challenge\/ - [L] | |
RewriteCond %{HTTP_HOST} !^www\. [NC,OR] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.jandhqualitykitchens.com.au/$1 [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment