Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • trfletch 598 posts 604 karma points
    Sep 14, 2009 @ 12:44
    trfletch
    0

    Website under going maintenance message on Homepage

    Hi,

    I am running an Umbraco V4 website and I currently have a lot of changes that I need to make on the live version, I would like to be able to put a message on the website so that when people visit they will see that currently the site is down for maintenance but I still need to be able to access the site myself so that I can test that it is all working. I also need to have the site that I test on use its proper URL because this needs to be correct so that I can fully test it all works (there are other sites that reference the site in their web.config). Is this going to be possible and if so how would I go about doing it?

  • dandrayne 1138 posts 2262 karma points
    Sep 14, 2009 @ 14:33
    dandrayne
    0

    You could set up an IP redirect to send all visitors to a new "wait a couple of hours" page on the site, and exempt your own IP (and any other sites or services that need access to the domain).

    Alternatively you could keep the site up, but just stick a large "things will be weird around here for a while" notice on the site whilst you work.

    Neither of these are ideal - I'd usually take a full backup of the site and work locally, but this doesn't seem to be an option here.

  • trfletch 598 posts 604 karma points
    Sep 14, 2009 @ 16:35
    trfletch
    0

    Yes, that is what I have done, taken a full backup and I am working locally but the problem is the site ties in with a number of other sites that will reference the sites URL in their web.config file so I cannot be sure it is working correctly until the site has it correct URL. I guess I am asking a bit too much really :-)

  • Sjors Pals 617 posts 270 karma points
    Sep 14, 2009 @ 16:57
    Sjors Pals
    0

    You can create a small usercontrol which redirects all traffic to the maintenance page, you can include this control in your mastertemplate.

    In the usercontrol you can do a simple check or you are logged in as admin, and if not redirect them.

  • Murray Roke 503 posts 966 karma points c-trib
    Jun 24, 2011 @ 03:38
    Murray Roke
    0

    I'm a bit late, but I'll add my comments here anyway in case subsequent searchers come here.

    Your holding page should not return status code for a redirect (302 or 301) the best response is 503.

    How I deal with this is to replace the default.aspx page in the website root. Replace it with a file containing something like this:

    <%
    Response.StatusCode=(int)System.Net.HttpStatusCode.ServiceUnavailable;
    %>
    <html><head><title>Error</title></head><body><head><title>Website offline for maintenance</title></head>
    <body>
    <h1>This website is currently offline for maintenance</h1>
    <p>Please try again later.</p>
    </body>
    </html>

    The advantage/disadvantage of this is that the umbraco infrastructure will use this for all requests (not just the homepage)

    On the plus side all ursl will return your nice maintenance page.

    On the down-side you can't use this if you're going to be messing with the umbraco infrastructure elements which it relies upon. (So in that case put up a separate IIS instance with this page.)

    Cheers.

    Murray.

Please Sign in or register to post replies

Write your reply to:

Draft