Possible Replicates
how can I use mod rewrite to redirect a folder to a subdomain ...
Apache rewrite based on subdomain (backwards)

I've catch all rules setup along with a subdomain working fine.

However will still be possible to get at part of my website from http://example.com/subdomain instead of http://subdomain.example.com/

Wouldso would I pressure a lasting redirect?

I am presuming it is something like:

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# (rule to see if i am inside subdomain folder)
RewriteRule ^(.*)$ http://www.subdomain.example.com/$1 [R=301,L]