Created
February 9, 2015 18:14
-
-
Save walkergv/38f3a3fc1de4570ca720 to your computer and use it in GitHub Desktop.
Redirect old domain to a new domain in .htaccess file
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
## Gets an the old domain and any sub page and redirects it to the new domain and any path after the hostname. | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} !^olddomain.com$ | |
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment