I am running my own server on my older computer. What I was thinking was, how would I go about if lets say the primary server gives a 404 error, to automatically go to a backup server.
So if my server at home was down, it automatically goes to another on.
Any help would be much appreciated.
Redirection
Moderator: General Moderators
Well, not sure how to reroute a non-existant server, but using .htaccess for 404 errors (page not found):
...and that page could contain a single header('Location: http://example.com/'); line used to forward the visitor.
You however ask "if your server is down"... Without the server, no error handling is available...
Code: Select all
ErrorDocument 404 /error-docs/404.phpYou however ask "if your server is down"... Without the server, no error handling is available...
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
unless u use a DNS service somewhere else(not in your computer, or the computer that is handling the web pages), like dns2go, it will check if the IP or URL can be reached through the port 80 and if not it will show another page saying that or it will redirect somewhere else
tecnically, your own server, if it's down, cannot receive requests, same thing if someone comes to your house and you are not there, you cannot say hi to them, unless you leave a note or a nice neighbor to tell the person(in that case you would be using a DNS)
u can have a computer that works at DNS where you have your other comp, but this one should always be ON, so this can work
tecnically, your own server, if it's down, cannot receive requests, same thing if someone comes to your house and you are not there, you cannot say hi to them, unless you leave a note or a nice neighbor to tell the person(in that case you would be using a DNS)
u can have a computer that works at DNS where you have your other comp, but this one should always be ON, so this can work