RewriteEngine on
RewriteBase /
# 域名1
RewriteCond %{HTTP_HOST} ^blog.51dev.com$ [NC]
RewriteCond %{REQUEST_URI} !^/blog/
RewriteRule ^(.*)$ blog/$1?Rewrite [L,QSA]
# 域名2
RewriteCond %{HTTP_HOST} ^whois.51dev.com$ [NC]
RewriteCond %{REQUEST_URI} !^/whois/
RewriteRule ^(.*)$ whois/$1?Rewrite [L,QSA]
# 默认
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]