I have run into a problem which is that my web host doesn't appear offer addon domains.
I currently have a domain name pointing to my name servers.
I went into cPanel to add an addon domain that points to a sub-directory, but all that is available in cPanel is to park domain at the document root which is 'public_html/'.
So traffic coming from the parked domain would get the wrong content, which is obviously not good.
I get the feeling that this isn't possible, but can I change the parked domain document root from 'public_html/' to 'public_html/sub-directory' ?
Or perhaps can I edit the .htaccess file to redirect traffic from the parked domain to the sub-directory?
Basically I want this address; www.parked-domain.com/
To show the content of this sub-directory; www.first-domain.com/parked-directory
I hope this is possible otherwise I need to look at a new web host.
Regards,
Dean.
You can change the document root directory by moving the contents of the public_html directory to another directory, and then creating a symbolic link that points public_html to the new document root directory.
Add the following to your .htaccess file:
RewriteRule ^parked-directory - [L]
RewriteCond %{HTTP_HOST} ^(www\.)?parked-domain\.com$ [NC]
RewriteRule ^(.*)$ parked-directory/$1 [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With