« Previous Next »

Thread: Deliberate show 503 error page

Last post 03-04-2009 3:00 AM by JorisNedStars. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 02-16-2009, 4:45 AM

    Deliberate show 503 error page

    During maintenance I would like to display a 503 error page on every request without a redirect. I'd like to use this solution because of the handling by google bots.

    I do know it is possible with apache by altering the htaccess file (although this is something I learnt from the internet and I didn't test it). My question is if this is possible on a windows server 2008 installation with IIS 7. I suspect it can be done with the URL Rewrite module but I don't know this for sure and I certainly don't have a clue how.

    Any help on this subject is very welcome!
  • 02-16-2009, 8:34 PM In reply to

    • vijaysk
    • Top 500 Contributor
    • Joined on 04-14-2007, 10:54 PM
    • Bangalore
    • Posts 18

    Re: Deliberate show 503 error page

    If it is an asp.net application you can use an app_offline.htm file. When asp.net finds an app_offline.htm file in an application it sends the contents of this file as the response to all dynamic requests. But the status code returned is a 404 and not 503.

    Vijayshinva Karnure
    http://blogs.msdn.com/vijaysk
  • 02-17-2009, 3:26 AM In reply to

    Re: Deliberate show 503 error page

    Thanks for your answer. It isn’t an asp.net application, so your solution doesn’t apply to me. Furthermore I specifically need a 503 error page. The service will be temporarily unavailable and that is exactly what a 503 error says. Google bots will leave the website without indexing it and will return later. If I display a 404 error they will index that and that’s not good for my ranking of course. That’s also the reason why I need to display it without a redirect on every request.

    But thanks for the help so far.

  • 02-17-2009, 4:21 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: Deliberate show 503 error page

    You should be able to do it with URL rewriter. If you want any request to a web site to result in 503 error, you could use URL rewrite rule similar to below:

      <rule name="Send 503" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <action type="CustomResponse" statusCode="503" subStatusCode="0" statusReason="Service Unavailable" statusDescription="The server is down for maintainace" />
     </rule>

    http://ruslany.net
  • 03-01-2009, 11:32 PM In reply to

    • olegip
    • Not Ranked
    • Joined on 05-17-2007, 5:52 AM
    • Posts 1

    Re: Deliberate show 503 error page

    The app_offline.htm file must be greater than 512 bytes if you want to MS Ineternet Explorer show the content of this file and not and a 404 Error Message default page.

     

  • 03-04-2009, 3:00 AM In reply to

    Re: Deliberate show 503 error page

    Thanks for your answers. The project that I needed the solution for is succeeded with your help. This topic can be closed as far as I'm concerned
Page 1 of 1 (6 items)
Microsoft Communities