Page 1 of 1

Redirection

Posted: Wed Nov 05, 2003 2:58 pm
by Haris_P
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.

Posted: Wed Nov 05, 2003 3:09 pm
by JAM
Well, not sure how to reroute a non-existant server, but using .htaccess for 404 errors (page not found):

Code: Select all

ErrorDocument 404 /error-docs/404.php
...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...

Posted: Wed Nov 05, 2003 3:12 pm
by Haris_P
Yea that's what I thought too. But I'll keep on searching to see if there's any other way.

By the way, why does my php page load slower than html, even though it has only html content on it, but just the extension is .php?

Posted: Wed Nov 05, 2003 3:14 pm
by Cruzado_Mainfrm
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