Glad to hear that it's working for you ... but the question you've asked makes me wonder:
RewriteRule ^subdir1/(.*)$ http://sub1.domain.com/$1 [R=301,L]
did the trick and redirected my virtual pages to the sub-domain.
However, it gave me 500 error everytime I browse any of the links or endless loop
[indent]This should NOT have happened as we've only stripped the subdir1/ from the path/to/file (where path = ^subdir1).
Asking for subdir1 (from domain), the server should serve the specified DirectoryIndex so, have you set the DirectoryIndex in the subdir1 directory? Remember, if not, the server's default (index.html?) will be served (or the ErrorDocument if you're not using index.html).
Even if you're using absolute links (to the domain/subdir1/path/to/file), the path/to/file within the subdir1 should be the redirection (within the subdomain).
Therefore, please show ALL your .htaccess as there must be something else going on.[/indent]
For better understanding on what's going go
Please login to the test environment located here www.artinglow.net
WARNING: placing a username and password in a public forum is NOT advisable!!! I recommend that you close this account ASAP!
Click on "Section" this should take you to www.artinglow.net/section/ but after applying the rewrite rule as follows:
RewriteRule ^section/(.*)$ http://section.artinglow.net/$1 [R=301,L]
It will show you http://section.artlinglow.net
and the same should go for "Sub-section"...
Now, to bring the actual pages up..and remove these errors..