HostMonster users to buy space and register on a main domain name, the default primary domain name point to /, add the addon domain points to / public_html. Want to achieve the following effects:
1. Set up the main domain name www.aaa.com point / public_html / aaa folder
2. Www.bbb.com point settings addon domain / public_html / bbb folder
Users can reference the following methods, Edit public_html directory. Htaccess file, add the following statement. If under public_html NOT. Htaccess files, create a new you.
Note: you will be revised to yourmaindomain.com domain name will be amended to subfolder you want the point to a subdirectory under public_html. The last line of index.php amended to read you the name of the Home page of the website. (To amend the contents of bold, other content not to change)
# Www.hostmonstercn.com
#. Htaccess main domain to subfolder redirect
# Copy and paste the following code into the. Htaccess file
# In the public_html folder of your hosting account
# Make the changes to the file according to the instructions.
RewriteEngine on
# Change yourdomain.com to be your main domain.
RewriteCond% (HTTP_HOST) ^ (www.)? Yourmaindomain.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) ^ (www.)? Yourmaindomain.com $
RewriteRule ^(/)?$ subfolder / index.php [L]
