RewriteEngine on
RewriteCond %{REQUEST_URI} =/
RewriteRule .* http://example.com/ [R,L]
RewriteRule (.+) http://$1.example.com/ [R]

If you go to example.org it redirects you to example.com
If...