RewriteEngine on
# for http RewriteCond %{HTTP_HOST} ^(www\.)?itnetcn\.com$ [NC] RewriteCond %{REQUEST_URI} !^/itnetcn.com/.* RewriteCond %{SERVER_PORT} =80 RewriteRule ^(.*)$ /yi/$1 [L]