Created
February 4, 2015 11:48
-
-
Save qutek/05c75e8931946d4653d4 to your computer and use it in GitHub Desktop.
[server] Rewrite old domain to 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
#rewrite all subdomain on old domain to subdomain on new domain | |
RewriteCond %{HTTP_HOST} ^(.*)\.olddomain\.com$ [NC] | |
RewriteRule ^(.*)$ http://%1.newdomain.com/$1 [R=301,L] | |
# rewrite all links to new domain | |
RewriteEngine on | |
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