Created
October 20, 2015 16:35
-
-
Save ethangardner/b8c97f4665c5d7976746 to your computer and use it in GitHub Desktop.
Redirect old domain to www version of a new domain
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 Redirects | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC,OR] | |
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$ [NC,OR] | |
RewriteCond %{HTTP_HOST} ^newdomain\.com$ [NC] | |
RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L] | |
</IfModule> | |
# END Redirects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment