Created
December 16, 2018 21:33
-
-
Save iamchetanp/ab7980963e91032f64a0329cbe027b4f to your computer and use it in GitHub Desktop.
Redirect non-www URLs to www with https (Apache)
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 non-www URLs to www with https | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment