wordpress 多域名 301跳转源码

2015/03 31 12:03

网上找了很多实例,都不是很全不适用个人情况。多个301情况我遇到是多域名,全站跳转。各位参考代码即可。

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^www.00io.com [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^00io.com [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^www.woshiui.com [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^www.woshiue.com [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^woshiue.com [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^www.iamue.cn [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^iamue.cn [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^www.woshiue.cn [nc]
rewriterule ^(.*)$ http://www.iamue.com/$1 [L,R=301]
</IfModule>

# END WordPress

网上找了很多实例,都不是很全不适用个人情况。多个301情况我遇到是多域名,全站跳转。各位参考以上代码即可。

--转载请注明: http://www.assey.cn/?p=904