Last active
March 11, 2016 19:45
-
-
Save ethangardner/cf3331af0c41d44dee4e to your computer and use it in GitHub Desktop.
Redirect non-www version of a domain to 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
# BEGIN Redirect | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301] | |
</IfModule> | |
# END Redirect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment