301 redirect


:
RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com
RewriteRule ^(.*)$ http://domain.com/subfolder/$1 [R=301]