How to show maintenance page during deployment?

2019-01-25 04:09发布

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

2条回答
手持菜刀,她持情操
2楼-- · 2019-01-25 04:17

Try putting App_Offline.htm to the root directory.

查看更多
成全新的幸福
3楼-- · 2019-01-25 04:42
登录 后发表回答