标签:域名跳转
# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
在对应的虚拟主机配置文件中加入
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.aaa.com$
RewriteRule ^/(.*)$ http://www.bbb.com/$1 [R=301,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.aaa.com [OR]
RewriteCond %{HTTP_HOST} ^www.bbb.net$
RewriteRule ^/(.*)$ http://www.ccc.com/$1 [R=301,L]
</IfModule>
本文出自 “8653294” 博客,请务必保留此出处http://8653294.blog.51cto.com/8643294/1744931
标签:域名跳转
原文地址:http://8653294.blog.51cto.com/8643294/1744931