Simply create a new .htaccess file in your site root folder and place below code in it
 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$ 
RewriteRule ^(/)?$ subdirectory[L]
Making sure to substitute example.com for your primary domain and subdirectory for the subdirectory to which you are redirecting the domain.
 Article ID: 1982, Created: September 4, 2018 at 7:28 PM, Modified: September 4, 2018 at 7:28 PM