<VirtualHost ip地址> #DocumentRoot /文件夹/ ServerName XXXX.com RewriteEngine on RewriteRule ^(.*)$ http://www.XXXX.cn$1 [R=301,L]</VirtualHost>