Created
May 14, 2015 14:48
-
-
Save homerjam/394a3ba39e8848051195 to your computer and use it in GitHub Desktop.
Redirect old domain to new domain via proxy
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
# .htaccess for old domain | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteCond %{HTTP:X-FORWARDED-HOST} !(.*)newdomain(.*) [NC] | |
RewriteRule (.*) http://newdomain.com/$1 [R=301,L] | |
# .htaccess for new domain | |
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteRule (.*) http://olddomain.com/$1 [P,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment