tags:

views:

111

answers:

2
Q: 

php cpanel

I have a php account with my provider, and I also have cpanel installed for me.

I currently have two drupal sites there, let's called the main myMainSite and another one under construction called myNewSite.

So when I go to www.myMainSite.com, I go to the main site. When I go to myNewSite.myMainSite.com, i go to the drupal site that is under construction.

My question is, when my under construction site goes live, I want that all users that go to www.myMainSite.com see the new site (the one that is under myNewSite.myMainSite.com).

How can I accomplish this with cpanel? is it within the "addon domains" configuration? I don't want a redirect that changes the address bar, ie, I want to keep the original url.

A: 

You would just change the DocumentRoot of www.mainsite.com to point to the same DocumentRoot as myNewSite.myMainSite.com.

TML
I do not control the Apache config
Miguel Ping
A: 

I assume you've used cPanel's subdomain control panel to add myNewSite.myMainSite.com. And I'll assume myMainSite.com is in the /public_html/ folder. Therefore the new site (and site with a subdomain) will be at /public_html/myNewSite.myMainSite.com

Why can't you just use File Manager (or FTP) to move all the files in /public_html/ to /public_html/OLDsite?

Then move everything from /public_html/myNewSite.myMainSite into the /public_html/ folder.

Then check your site is working with the new files.

Maybe you could also send a support ticket to your host to see if there's another way. It could be as simple as them changing something in Apache's conf file for the myNewSite.myMainSite.com subdomain.

I'd also think you'd need to change the settings in Drupal (when you've changed domain) so Drupal knows the new domain name too.

Coffee Cup
I'm using a CMS that references the full path for some directories, so I cannot move things around.
Miguel Ping