is this possible
It is in vhost or server config. It is not possible using an htaccess file unless you can already access the /sub_dom/
directory via your regular domain. You can't access any directory outside of your document root using your htaccess file.
is there a better solution (for example would it be better/more advisable to do it another way)
The correct way to do it is to create a new vhost. Your old vhost should have server names something like this:
ServerName domain.com
ServerAlias www.domain.com
In your new vhost, you have:
ServerName admin.domain.com
And a:
DocumentRoot /path/to/sub_dom/
The Apache documentation has a tutorial for setting up vhosts.
Alternatively, you can create an alias from your regular domain, something like:
Alias /sub_dom /path/to/sub_dom
Then you can use mod_rewrite in your domain.com document root (httpdocs):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^admin\.domain\.com$ [NC]
RewriteCond %{DOCUMENT_ROOT}/sub_dom%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}/sub_dom%{REQUEST_URI} -d [OR]
RewriteCond %{DOCUMENT_ROOT}/sub_dom%{REQUEST_URI} -s
RewriteRule ^ /sub_dom%{REQUEST_URI} [L]
But, you may as well just move /sub_dom/
into httpdocs
, it'll achieve the same thing.