1. Apache模块 开启rewrite
2..htaccess文件中
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^XXXkuan.cn$ [OR]
RewriteCond %{HTTP_HOST} ^XXXwang.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.xxxkuan.cn$ [NC]
RewriteRule ^(.*)$ http://www.xxxwang.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>