如何在部署期间显示维护页面?

时间:2021-07-22 01:52:05

I want to plan a schedule maintenance down time on one of my production asp.net website hosted on IIS windows server 2003.

我想在IIS windows server 2003上托管的一个生产asp.net网站上计划一个计划维护停机时间。

I think this is the preferred behavior:

我认为这是首选行为:

  1. All request to http://www.x.com including www.x.com/asb/asd/ will be redirected to a notification page (site is currently down. come back later)
  2. 所有对http://www.x.com的请求(包括www.x.com/asb/asd/)都将被重定向到通知页面(网站目前已关闭。稍后再回来)
  3. The maintenance will take around an hour. how do I ensure for having this redirection to maintenance page to have the least impact to SEO/google ranking
  4. 维护大约需要一个小时。如何确保将此重定向到维护页面以对SEO / google排名产生最小影响
  5. Preferrably I want to be able to quietly test the production site before it goes back 'live'
  6. 我希望能够在“生活”回归之前悄悄地测试生产现场
  7. Preferrably I dont want to rely on pointing DNS elsewhere.
  8. 我更不希望依赖指向其他地方的DNS。
  9. To make it simple please pretend that I don't have any other hardware in front of the web servers (i.e load balancer, firewall etc)
  10. 为简单起见,请假装我在Web服务器前没有任何其他硬件(即负载平衡器,防火墙等)

An idea would be:

一个想法是:

  1. to create another app on the same web server
  2. 在同一个Web服务器上创建另一个应用程序
  3. create httpmodule or httphandler to handle any url request and 302 redirect them to the maintenance page
  4. 创建httpmodule或httphandler来处理任何url请求,302将它们重定向到维护页面

Thanks

谢谢

2 个解决方案

#1


40  

Try putting App_Offline.htm to the root directory.

尝试将App_Offline.htm放到根目录。

#2


6  

copy an app_offline.htm file to the webroot

将app_offline.htm文件复制到webroot

http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

#1


40  

Try putting App_Offline.htm to the root directory.

尝试将App_Offline.htm放到根目录。

#2


6  

copy an app_offline.htm file to the webroot

将app_offline.htm文件复制到webroot

http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx