用一台虚拟主机做所有域名的301服务器

.htacess如下

RewriteEngine On
RewriteCond %{http_host} ^yjy.im$ [NC]
RewriteRule ^(.*)$ http://yjy.ddter.cn/$1 [R=301,L]
RewriteCond %{http_host} ^www.yjy.im$ [NC]
RewriteRule ^(.*)$ http://yjy.ddter.cn/$1 [R=301,L]
RewriteCond %{http_host} ^yjy.in$ [NC]
RewriteRule ^(.*)$ http://yjy.ddter.cn/$1 [R=301,L]
RewriteCond %{http_host} ^mtg.so$ [NC]
RewriteRule ^(.*)$ http://www.mtgso.cn/$1 [R=301,L]
RewriteCond %{http_host} ^www.mtg.so$ [NC]
RewriteRule ^(.*)$ http://www.mtgso.cn/$1 [R=301,L]