2

We are planning a maintenance window for some of our sites (say at a.b.com, b.b.com and c.b.com). What we would like to do is to return a 503 return code for a holding page sitting on our main site (which is powered by a Tridion CMS database) (say at www.b.com/maintenance.html) as that site is not undergoing maintenance. Is that possible?

We know you can create an app_offline.htm file in the root of each of the applications undergoing maintenance, but that would require us to build a maintenance page for each application, rather than just to add some content to a page on our main site and publish that content out through our CMS. A redirect could then be created in our load balancer for the domains undergoing maintenance to the holding page.

Harald Greve
  • 147
  • 3
  • 14

1 Answers1

4

Yes. You can create a CustomResponse action type. Here is the documentation for creating custom response codes: https://technet.microsoft.com/en-us/library/ee215207(v=ws.10).aspx

<rule name="My custom response">
    <match url="^my_url_regex_pattern$"/>
    <action type="CustomResponse" statusCode="503" statusReason="Undergoing Maintenance" />
</rule>
Robert S
  • 496
  • 4
  • 14
  • Unfortunately, this is is not what I was looking for. Yes, you are right that this returns a 503, but it also returns a system error page rather than a nice looking, branded maintenance page. – Harald Greve Feb 13 '17 at 08:53
  • 1
    Have you seen this: http://serverfault.com/questions/483145/how-to-add-a-site-wide-downtime-error-message-in-iis-with-a-custom-503-error-co ? – Robert S Feb 14 '17 at 12:33