I thought driveflexfuel wrote he only wanted to redirect a single subdomain. For mapping all subdomains to sub-directories, perhaps something like:
Code:
# ensure that subdomain refers to an existing sub-directory
RewriteCond %{HTTP_HOST} ^([^.]+)\.website\.com$
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^ - [C]
# map subdomain to sub-directory if not already present in URL
RewriteCond %{HTTP_HOST} !^(www\.)?website\.com$
# get the subdomain name
RewriteCond %{HTTP_HOST} ^([^.]+)\.website\.com$
# don't add subdir if already present
RewriteCond %1/$1 !^([^/]+)/\1
RewriteRule ^/?(.*) /%1/$1