Created
February 14, 2017 21:16
-
-
Save NikLP/fdcb8a6edd625b906d0beacef4de13f6 to your computer and use it in GitHub Desktop.
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
# If your site can be accessed both with and without the 'www.' prefix, you | |
# can use one of the following settings to redirect users to your preferred | |
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: | |
# | |
# To redirect all users to access the site WITH the 'www.' prefix, | |
# (http://example.com/... will be redirected to http://www.example.com/...) | |
# uncomment the following: | |
RewriteCond %{HTTP_HOST} . | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment