Created
January 13, 2017 18:15
-
-
Save Neolot/4b4d31fa0f9136b080703b827f6d6bfc to your computer and use it in GitHub Desktop.
APACHE Redirect http to https and www to non-www
This file contains hidden or 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 | |
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC] | |
RewriteRule (.*) https://%1%{REQUEST_URI} [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment