部署时如何显示维护页面?

发布于 2024-07-19 00:26:43 字数 539 浏览 6 评论 0 原文

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

我认为这是首选行为:

  1. 所有请求 http://www.x.com 包括 www.x.com/asb/asd/ 将被重定向到通知页面(网站当前已关闭,稍后再回来)
  2. " 大约需要一个小时。 我如何确保此重定向到维护页面对 SEO/google 排名的影响最小
  3. 最好我希望能够在生产站点返回“实时”之前悄悄地测试它
  4. 最好我不想依赖于在其他地方指向 DNS 。
  5. 为了简单起见,请假装我的 Web 服务器前面没有任何其他硬件(即负载均衡器、防火墙等)

一个想法是:

  1. 在同一 Web 服务器上创建另一个应用程序,
  2. 创建 httpmodule 或 httphandler 来处理任何url请求和302重定向到维护页面

谢谢

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

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. 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
  3. Preferrably I want to be able to quietly test the production site before it goes back 'live'
  4. Preferrably I dont want to rely on pointing DNS elsewhere.
  5. 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)

An idea would be:

  1. to create another app on the same web server
  2. create httpmodule or httphandler to handle any url request and 302 redirect them to the maintenance page

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

菩提树下叶撕阳。 2024-07-26 00:26:44

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

Try putting App_Offline.htm to the root directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文