Friday, June 27, 2008

GoDaddy Hosting Issue - "Downgrading" from Windows server to Linux

A client has a GoDaddy shared hosting account, hosting several domains on a MS Windows server. I needed some functionality which is only available on a linux server, so I went to the GoDaddy control panel and "downgraded" to linux. Technical support assured me that the conversion would be seamless, and although the transfer to linux would take 24 hours, the website wouldn't be interuppted (and I had no asp scripts to worry about).

Needless to say, the _entire_ site, including several domains, broke completely upon transfer.

The way the GoDaddy sets up multiple domains under one account is to have the main domain as the "root", and subsequent domains are mapped to subdirectories (from the control panel). For example, here is a typical directory structure:

  • /index.html serves http://domain_1.com/index.html
  • /domain_2/index.html serves http://domain_2.com/index.html
  • /domain_3/ serves http://domain_3.com/index.html
In other words, additional domains within a Godaddy account are mapped to subdirectories of the main account.

What broke during the switch from windows to linux server was this mapping. So while I could access http://domain_1.com/domain_2/index.html, I couldn't access this same file via http://domain_2.com/index.html (like it did before the transfer).

Technical support said I would have to wait for up to 3 days for everything to straighten out. As these were high-traffic commerce sites, 3 days was unacceptable. So rather than changing _all_ the links as suggested by GoDaddy tech support (still leaving the secondary domains broke), I added the following lines to my .htaccess file:


Redirect 302 http://www.domain_2.com/(.*) http://domain_1.com/domain_2/$1
Redirect 302 http://www.domain_3.com/(.*) http://domain_1.com/domain_3/$1


Voila! All the sites (and containing links) were fixed. Note that 302 is for temporary redirects, while 301 is used for permanent redirects. I hope that I will be able to remove the redirects in a couple days, when GoDaddy fixes its internal mapping.

update: Once GoDaddy fixed their mapping, I removed the 302 redirects.

Labels: , , ,

2 Comments:

Anonymous Anonymous said...

I have a problem. I got my host from godaddy but I just discovered that PHP doesn't work well on my windows server.
You said I have to go on my control panel and witch the windows server for a linux one but I don't find it on my panel.

Can you please tell me where i can switch for a linux server please? And is it free?

July 26, 2008 3:00 PM  
Blogger Rick said...

Yes, it is a free "downgrade". Start at the GoDaddy Home Page
Click on "My Account", log in if necessary. Under "My Products" on left side of page, click on "Hosting".

Now in the Middle of the page, click on your account (e.g. yourdomain.com).

On right side of page, you will see "upgrade/downgrade hosting account". Click on it. You are there.

You'll probably want to upgrade to Hosting Configuration 2.0 at the same time, here's godaddy help info:
http://help.godaddy.com/article/1078

Better yet, find a another host. I like DreamHost for shared hosting.

July 26, 2008 3:20 PM  

Post a Comment

Links to this post:

Create a Link

<< Home