Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> How Do I Mirror A Website?
kvarnerexpress
post Dec 7 2005, 05:09 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



After the last batch of hurricanes we lost 5 days of traffic due to power outages in S. Florida.

What I really want to do is redirect a visitor to a copy of the website if the original site takes more than a set amount of time.
If heavy traffic causes the original site to take more than 10 seconds to load I want the visitor automatically redirected to a copy on a different server.

Can this be done somehow? I'm thinking the requests might have to go through a first server that times the two other servers and decides which is the best route.

Any ideas?
Thanks,
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Dec 7 2005, 05:20 PM
Post #2


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,497
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



How about inserting a redirect script in 403 error page? You can insert a 10 second delay (less than 10 or zero delay) in your customized 403 error page that will redirect the traffic to your set URL.

Tools involved:
editing your own 403 HTML file
editing your .htaccess file

Notice from BuffaloHELP:
Nope never mind. I just realized the error in my logic. And it's not what you requested.


This post has been edited by BuffaloHELP: Dec 7 2005, 05:23 PM
Go to the top of the page
 
+Quote Post
no9t9
post Dec 7 2005, 06:02 PM
Post #3


Privileged Member
*********

Group: Members
Posts: 773
Joined: 4-November 04
Member No.: 2,118



yes, you can do that. you will have to setup your domain to point to a server that is outside of florida and then have that page run a script that pings your "mirror" servers and then redirect to the mirror with the quickest ping time.

if the server is down, you will not get a response. But you might have to set the timeout to something like 500ms because you dont want people to be waiting for your site to load.

I did a quick google on php ping and found a script from hotscripts that can ping a server to tell if it is online or offline.

http://www.hotscripts.com/Detailed/45590.html

Once you know if it is online or offline, then all you have to do is redirect to the one with lowest ping that is online.
Go to the top of the page
 
+Quote Post
switch
post Dec 8 2005, 12:41 AM
Post #4


Premium Member
********

Group: Members
Posts: 178
Joined: 13-October 04
From: NSW, Australia
Member No.: 1,713



the problem with all this is that you have to go through a server before it checks if the other servers are down, i.e. if the redirecting server crashes, then you're no better off than before!

I thought the idea of Buffalohelp's 403 error redirect script was brilliant... but then i read the comment that says it doesn't work (if anyone is wondering why, it's because for a 403 error page to get to the user, the server needs to generate a 403 page. If the server's down, this won't occur.)

I think the only way to do it would be to involve the DNS (Domain Names Server). However, I don't think you can do it this way.

I guess the easiest solution is to put on your main website a link to the mirror so people knew the link to the mirror if the main site was down.

I'm not sure if this would work, but it's an idea:
When the web page can't be found, the browser checks the Temporary Internet Files to see if it can find a file there (I think. You'd want to check this). Maybe you could make it so that each page on your site automatically checks if your site is up... then, when the Temporary Internet Files version was loaded, it would check to see if your site was up, realise it isn't, and redirect accordingly. This would only work if the user had previously visited your site, though.

hope I've helped smile.gif

cheers.
Go to the top of the page
 
+Quote Post
DeveloperX
post Dec 21 2005, 11:22 AM
Post #5


Advanced Member
*******

Group: Members
Posts: 130
Joined: 21-December 05
Member No.: 15,990



U may create a mirror of your website at freeservers.com.
There U must create a free subdomain.
After it goto your account and click "Manage site".
There U can see button "Upload from other site"... but they give free only 20 Mb space....
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Tips on creating a good website!(8)
  2. Website Security(2)
  3. Optimizing Website?(10)
  4. I Finally Found A Simple Way To Do A Blendtrans(1)
  5. Ftp Website(0)
  6. Website Copy Protection(15)
  7. Html Templates(3)
  8. Making A Refresh Link On Your Website.(16)
  9. Website Deployment Problems(3)
  10. Background Image Picture On A Website(3)
  11. How To Make Cms For My Dynamic Website?(3)
  12. Help With Website Layout Correction For All Browsers(4)
  13. Making This Website Automatically Scale For Browsers(1)
  14. Website Problems Please Help(6)
  15. Website Drop Shadow Effect Help(7)
  1. Build A Website(13)


 



- Lo-Fi Version Time is now: 13th October 2008 - 05:45 AM