RewriteEngine on
DirectoryIndex index.php index.html index.htm
#让www.xxx.cn 访问根目录CMS
RewriteCond %{HTTP_HOST} ^www.xxx.cn$
RewriteCond %{REQUEST_URI} !^/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /
$1
RewriteCond %{HTTP_HOST} ^www.xxx.cn$
RewriteRule ^(/)?$ /index.php [L]
#让home.xrnic.cn 访问home目录UcenterHome
RewriteCond %{HTTP_HOST} ^home.xxx.cn$
RewriteCond %{REQUEST_URI} !^/home/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /home/
$1
RewriteCond %{HTTP_HOST} ^home.xxx.cn$
RewriteRule ^(/)?$ home/index.php [L]
#让bbs.xrnic.cn 访问bbs目录论坛
RewriteCond %{HTTP_HOST} ^bbs.xxx.cn$
RewriteCond %{REQUEST_URI} !^/wap/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /bbs/
$1
RewriteCond %{HTTP_HOST} ^bbs.xxx.cn$
RewriteRule ^(/)?$ bbs/index.php [L]