views:

69

answers:

2

For a client I need to temporarily route their traffic to my own subdomain. Their host (a shared host) needs to be reconfigured for the site to work, but the client wants their site online ASAP (what else is new ;-)

Considering the following:

  • It's a new site/new domain, so there is no legacy SEO traffic.
  • Preferably I'ld like the clients domain to stay in the addressbar of visitors browser
  • On my subdomain all traffic will be routed with mod_rewrite following the front controller pattern (i.e. http://example.com/some-seo-url/ will be handled by index.php)
  • Edit my own host is a shared host as well, so I don't have access to virtual hosts definitions.

What is the best practice to route all their traffic to my own subdomain for a while?

Please advice as to how this can best be achieved.

+2  A: 

You could add a CNAME entry with their domain manager to point to your domain. Give it a time-to-live of the shortest period possible so that clients' DNS records will get refreshed ASAP.

As far as handling it on your end, the front controller pattern should help you sort out things coming from www.theirdomain.com and www.yourdomain.com.

To test, you can add an entry in your hosts file for www.theirdomain.com and point it to your servers and make sure everything is on the up-and-up before you mess with DNS records.

Travis Gockel
Sounds good Travis. If they don't have a domainmanager for clients (I believe they don't) is it a trivial thing for a provider to add a CNAME entry?
fireeyedboy
Whoever their domain registrar is (godaddy, Network Solutions, etc) probably has some sort of control panel where you can just change the record of where their domain points.
Travis Gockel
Alright, I'll contact the hosting provider about it then. Thanks for the suggestion. Never would have come up with this on my own. I was thinking more about a mod_rewrite solution. +1
fireeyedboy
+1  A: 

Setup an Apache VirtualHost with the client's domain and change the DNS records of said domain to point to your server (with a low TTL to make the change back as instant as possible). Reload Apache's configuration and you're done

Charlie Somerville
Charlie, thanks for your answer. Good suggestion, but I should have mentioned, that my own host is a shared host as well. So I don't have access to Virtual Hosts definitions. Sorry.
fireeyedboy