.htaccess跨域名301重定向

本例展示.htaccess

www.shanmao.me 301重定向到 www.loaninformation.us

RewriteEngine On
RewriteCond %{HTTP_HOST} ^shanmao.me [NC]
RewriteRule ^(.*)$ http://www.shanmao.me/$1 [L,R=301]     ##不带www301重定向到带www
RewriteCond %{HTTP_HOST} ^www.shanmao.me [NC]
RewriteRule ^(.*)$ http://www.loaninformation.us/$1 [L,R=301]    ## 跨域名301重定向