Hi,
I'm having a bit of trouble managing my directory structure in contrast to my domain- and subdomain structure.
I have one primary domain from BH and 13 other (addon/parked) domains reserved from another registrar. This makes for 14 domains linked in my cPanel, twelve of which need to show the same content as my primary domain and two which I need to have them share their own document root. In addition I need subdomains for both addons so that I can access both, say, staging and production versions through these subdomains. They would also live in their own unique (but shared) document root as well. Put another way, what I want is this:
Problem is - if I leave these domains parked, I can create subdomains for the uses I want, but if I browse for eg www.domain-X.com, I end up with the content being drawn from my primary domain (call it primary.com for example) which is not at all what I want.Code:(www.)domain-X.com -> /public_html/PRODUCTION/domain-XY (www.)domain-Y.com -> /public_html/PRODUCTION/domain-XY staging.domain-X.com -> /public_html/STAGING/domain-XY staging.domain-Y.com -> /public_html/STAGING/domain-XY
If, in parking, I create a .htaccess file with the following terms:
I get the BH template response of "There is no website configured at this address."Code:RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?domain-x\.com$ RewriteRule ^(/)?$ PRODUCTION/domain-xy/index.php [L] RewriteCond %{HTTP_HOST} ^(www\.)?domain-y\.com$ RewriteRule ^(/)?$ PRODUCTION/domain-xy/index.php [L]
If I assign them as addon domains, I can't create the document root in the place I want, as I am forced to give the "/public_html/website" type of path, no subfolders. This, again, is not something I want.
This was I can create the subdomain I want through the cPanel subdomain manager, but when assigning the addon domain, I am required to give the addon domain as the subdomain to my primary domain (ie. domain-x.primary.com) which yet again is not what I want.
I can't get any htaccess code working so I could bypass and override the "/public_html/website" path into "/public_html/PRODUCTION/domain-xy", as if I enter the following code:
I just get a 500 internal server error... I've tried plowing through the threads here but haven't found a solutionCode:RewriteCond %{HTTP_HOST} ^(www\.)?domain-x\.com$ RewriteCond %{REQUEST_URI} !^/PRODUCTION/domain-xy RewriteRule ^(.*)$ PRODUCTION/domain-xy/$1 [L]![]()


