I\'d like to map subdomain.example.com to www.example.com/subdomain using an internal URL rewrite that looks at the host name and simply forwards a
subdomain.example.com
www.example.com/subdomain
Using .htaccess:
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]