Last active
February 13, 2017 20:33
-
-
Save lyquix-owner/48ec9523b6c1c3a1acd0e5fd71071bec to your computer and use it in GitHub Desktop.
Redirect domain to www and force SSL
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 domain to www and force SSL # | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www.example.com$ [OR,NC] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment