htaccess – How to direct primary domain to a folder

So you have purchased hosting space that allows multiple domains. Might get a bit challenging when it comes time to implement it. Ideally, it would be great to have each domain in its own folder. Here is how you can move the primary domain to a folder and redirect it to the folder. Afterwards, you can create additional folders for each additional domain.

1. FTP into your Public_html directory.
2. Create a Folder in Public_html and name it your primary domain.
3. Find the file .htaccess in Public_html and copy it to your computer. Make an original copy for backup.
3. Open .htaccess with text editor.

Type in the following (sample code example):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{REQUEST_URI} !^/Folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteRule ^(/)?$ Folder/index.php [L]

Anything in blue, replace with your own information.
Folder = the new folder you created to put your primary domain into = the primary domain name you are redirecting.