step1:
去掉LoadModule rewrite_module modules/mod_rewrite.so的#
step2:
修改所有的 AllowOverride none 爲AllowOverride all
step3:
然後在對應的目錄下面:
把www.test.gov.cn 跳轉到
<VirtualHost *>
ServerName www.test.gov.cn
ServerAlias www.test.gov.cn //別名 一般是需要過濾的域名
DocumentRoot /cicro/wcm/vhosts/www.test.gov.cn/ROOT
Alias /manager "/cicro/wcm/vhosts/common/manager//"
Alias /wcm.files/ "/cicro/wcm/wcm.files//"
JkMountFile /cicro/wcm/as/apache/conf/uriworkermap.properties
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.test.gov.cn [NC]
RewriteRule ^(.*) http://www.目標.gov.cn/ [L]
</IfModule>
</VirtualHost>