Hey all,
Been a long time and posting. Anyways, I'm trying to "add" a new domain (domainB) to my main domain (domainA). I want domainB to be located at "/public_html/_users/userB/". However, Andrew stated the following after a TT was sent by me:
---
Sorry, this is not entirely possible with cPanel. What you need to do is create an addon domain, but it cannot go into two directories, it can only be a single directory off of the original public_html directory.
---
...meaning that what it only works if its "/public_html/_userB/", only 1 sub-directory deep of "/public_html/". Althought, there is a work around (should be) which I'm hoping to get by using mod_rewrite/.htaccess. So, gowing through my other .htaccess codes that I used for subdomain-management (since I have a dedicated IP) for the particular cpanel account, I came up w/ the following:
My questions is, does anyone see anything wrong with this implementation?
I tried it and utilized it in /public_html/.htaccess; then went to try domainB.com/www.domainB.com... it works so far. No error_logs were created or anything. I just don't want it doing something that I'm not seeing pretty much. So please, if you can try this as well, it'll be great.
TIA
Been a long time and posting. Anyways, I'm trying to "add" a new domain (domainB) to my main domain (domainA). I want domainB to be located at "/public_html/_users/userB/". However, Andrew stated the following after a TT was sent by me:
---
Sorry, this is not entirely possible with cPanel. What you need to do is create an addon domain, but it cannot go into two directories, it can only be a single directory off of the original public_html directory.
---
...meaning that what it only works if its "/public_html/_userB/", only 1 sub-directory deep of "/public_html/". Althought, there is a work around (should be) which I'm hoping to get by using mod_rewrite/.htaccess. So, gowing through my other .htaccess codes that I used for subdomain-management (since I have a dedicated IP) for the particular cpanel account, I came up w/ the following:
Code:
RewriteCond %{HTTP_HOST} ^(www\.)?domainB\.com
RewriteCond %{REQUEST_URI} !_users/
RewriteRule ^(.*)$ _users/userB/$1 [L]
I tried it and utilized it in /public_html/.htaccess; then went to try domainB.com/www.domainB.com... it works so far. No error_logs were created or anything. I just don't want it doing something that I'm not seeing pretty much. So please, if you can try this as well, it'll be great.
TIA

Comment