-1

I have two urls:

myurl.co.za
myurl.net

And a 3rd url:

myurl.com

Depending on different times of the day, I want users to be redirected to either myurl.co.za or myurl.net. I have a program that I can easily set to redirect to either based on the time of day rule (and other rules).

  1. Where (or using what Service) would I use to host the myurl.com application that will gaurentee zero downtime? Is there some kind of fallover solution that is cheap and reliable that could gaurentee this?
  2. Is there a way to set this up so that if you type in myurl.com, the ultimate result being shown is hidden from the visitor? I.e. They don't ever see .net or .co.za, they always see .com?

UPDATE

I have the script part. That is sorted. What I want to know is where or on what type of configuration to host it so it will always be online. For example, a dedicated server will not do, because if it goes down, the main myurl.com site will be down. Is there some kind of cloud solution that will always remain online, that I could use only to direct traffic to the relevant URL.

And the second part is how do I hide the redirection?

1 Answers1

0

You can use php script on myurl.com

<?php 
if (date('H') < 14) { // Hour
header("Location: http://myurl.co.za");
} else {
header("Location: http://myurl.net");
}
?> 

Or use nginx / haproxy for loadbalancing

For hide the .co.za and .net you can also use haproxy or nginx as proxy server: http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.html

Marek Wajdzik
  • 421
  • 2
  • 4