It is definitely possible to redirect via .htaccess. You can do this by changing the following code for your subdomain.
# Do not change this line.
RewriteEngine on
# Change subdomain.yourdomain.com to be your domain.
RewriteCond %{HTTP_HOST} ^(subdomain.)?yourdomain.com$
# Change 'subfolder' to be the folder you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subfolder/
# Don't change this line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subfolder' to be the folder you will use for your main domain.
RewriteRule ^(.*)$ /subfolder/$1
# Change yourdomain.com to be your main domain again.
# Change 'subfolder' to be the folder you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(subdomain.)?yourdomain.com$
RewriteRule ^(/)?$ subfolder/index.html [L]
Please see: .htaccess to make a subfolder the main folder for primary domain, but getting redundant redirects when URL is typed directly into browser
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…