What would be the best way to automatically redirect to a mirror website if the main website being is down? Should it be done via DNS, and how can I set this up? Basically, what I need is to have an exact copy of the site (not frequently updated, so no synchronization necessary) to be a fall back incase of failure. Kind of almost like a load balanced solution.
The codes for redirecting pages are 301 (permanent redirection) and 302 (temporary redirection). These codes are universal for all webservers, and that is where you should look to implement such changes.
Here's a very simple example using apache: about.com
Good Luck,
Yishai