Try with this:
RewriteCond %{REQUEST_URI} ^/yoursub
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://yoursub.domain.com/$1 [L]
The 2 lines in the middle will prevent redirecting if that folder or file exists. To remove file and folder exception, comment out that 2 lines, and stay with this only:
RewriteCond %{REQUEST_URI} ^/yoursub
RewriteRule ^(.*)$ http://yoursub.domain.com/$1 [L]
CuSS
2010-04-30 09:47:16