addon domain redirect to the main domain
Hi, I have a problem when Adding a new domain to Cpanel Account I need this domain to be an add-on domain, not a redirect.
That means opening the main public_html not redirecting to the main domain
Now I add the new domain in the "Domains" section and I uncheck "Share document root" and type /home/domainaccount/public_html but it still redirects to the main domain
I need to add a domain; when I type the new domain, the URL does not change.
How can I do that?
Many thanks
-
Hey there! By not selectign the "share document root" button you are indeed creating an addon domain, so I wouldn't expect this to redirect to any other content. However, if you are manually using /home/username/public_html as the document root, I *would* expect that to cause a redirection. That is essentially telling the addon domain to use the same home directory as an existing site.
If you just let cPanel fill in the document root you'll see it creates /home/username/addondomain so there is no link to the existing public_html directory, and the content redirect won't happen.
0 -
Thank you for your reply.
sswill create another document root which is not what I want.
I want to create a new domain in the account and go to the same main document root without changing the URL.
0 -
There isn't going to be just one tool that will accomplish that. In order to that you would still want to create a parked domain so the domains share a document root. Once that is done, you would need to manually add custom .htaccess rules in order for the original domain to stay in the browser.
Unfortunately I don't have any ready-made code for the .htaccess file for this situation, so that will take a bit of research and trial-and-error in order to configure it properly for your needs.
0
Please sign in to leave a comment.
Comments
3 comments