Forum Moderators: coopster
# Extract the subdomain part of domain.com
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com [NC]
# Check that the subdomain part is not www and ftp and mail
RewriteCond %1 !^(www|ftp|mail)$ [NC]
# Redirect all requests to a php script passing as argument the subdomain
RewriteRule ^.*$ http://www.domain.com/channel/?uid=%1 [R,L] RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com [NC]
RewriteCond %1 !^(www|ftp|mail)$ [NC] RewriteCond backreferences: These are backreferences ... which provide access to the grouped parts (again, in parentheses) of the pattern, from the last matched RewriteCond in the current set of conditions
If the first condition doesn't match, e.g. for all non-www requests, the ruleset doesn't run at all. But that's probably exactly what's wanted anyway.
Why don't you put a separate .htaccess file in your http://www.example.com/vsubdomain folder?