Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirecting when Website Down 4

Status
Not open for further replies.

sciclunam

Programmer
Oct 12, 2002
138
0
0
MT
Hi,

I need to redirect my visitors to another server where I can display a page informing my visitors that my site is beong updated. I hate it when the site is down because of server problems from my host and visitors get an error message.

Can I redirect them to somewhere else?

Thanks

Mario
 
Not being smart or anything, but it seems to me that if you need someone to redirect your visitors because your site if frequently down, your real need is a new host, not a "redirect" site. Get another one.

 
Not wanting to read into your issues of why your server is down... I'd say it's not going to work so well, because if your page is down, it's not alive to serve up a redirect. If you're talking about while you're updating as you suggested, then sure, just put in a little javascript or meta reload or whatever that sends them to another URL.

Otherwise, the solution would be to find a rock solid host that you can setup a little utility which will see if your page is up or not, if not it'll re-direct, if so, it'll send them there.

-Rob
 
Dear skiflyer,

do you know where I can find such script?

Thanks

Mario
 
Hi there,

place this script between the head tags on your page which should do the redirecting:
Code:
<script language=&quot;JavaScript&quot;>
<!--
window.location.href=&quot;[URL unfurl="true"]http://www.tek-tips.com&quot;;[/URL]
-->
</script>

If you have to link to a page which is on the same server, use:
Code:
window.location.href=&quot;yourpage.htm&quot;;


regards, goaganesha
 
THANKS.

BUT I WANT A REDIRECTION AFTER CHECKING IF THE SITE IS DOWN OR NOT.

I NEED A SCRIPT WHICH CHECKS IF A SITE IS UP AND THEN REDIRECTS OTHERWISE IT STAYS THERE.

THANKS
 
Don't think that is possible since when the server is down, it is also unable to run a script which will redirect to another page.
Why don't you put your website on the server to which you want to redirect as this server is more reliable anyway?
regards, goaganesha
 
I don't know how it works with the other servers, but on an iSeries, I can shut down that server. Then start a different one on that same port to notify of upgrades. When the upgrades are complete... I shut down the other one and start up the default one. iSeriesCodePoet
IBM iSeries (AS/400) Programmer
[pc2]
Want to have all your bookmarks in one spot?
 
dear goaganesha,

this script will run on a page where the server is more secure. It checks if the 'other' server is down. If it is visitors stay on this page if it is up then visitors are directed to the 'other' server.

thanks
 
I'd search this or the javascript forum ( I forget where it happened ) about testing to see if popups are enabled... some great code was posted.

A similar approach would certainlly work to test to see if a website was alive or not.
It's an odd approach, but it should work.

-Rob
 
ooh, even better... I give Wullie a star for seeing the smart way to do it instead of the convoluted way like me.

-Rb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top