i have done this and works:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(sub)\.domain\.com$ [NC]
RewriteRule !^sub(/.*)?$ /sub%{REQUEST_URI}[QSA,L]
but i want also to work with www.sub.domain.com
So how can i get this to work as http://sub.domain.com ( works now ) , and also http://www.sub.domain.com (goal) simultanously without redirect one to other?