SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2008
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question script to redirect if server is down

    hi all

    i need to have a script that will check if server A is down and then redirect to server B. i guess that the script will be hosted on another site in order to do these checks. I would appreciate if someone can point me in the right direction to achieve this.

    thanks

  2. #2
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Can you be a little more descriptive? I'm not sure what you're asking.

    Here's how I understood it: When the client requests a page, you want to be able to check if the server that hosts that page is down; if the server is down, then redirect the user (with an HTTP header, perhaps?) to a different server that has either the page they were looking for or a message about technical difficulties.

    How close am I?
    I'm the web overlord for Graphic Business Systems

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2008
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes that is exactly what i want but if the server is down then the redirection can't be done with an http header because nothing will run on that server. so a script on a separate server should check first server and if it's down it should redirect to server b
    thanks

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by tanicos View Post
    yes that is exactly what i want but if the server is down then the redirection can't be done with an http header because nothing will run on that server. so a script on a separate server should check first server and if it's down it should redirect to server b
    thanks
    This is something that is much better done with server-side code such as PHP or .NET
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •