When I've built sites using plain old ASPNET, one of the features I
like to include is a setting in web.config that lets me redirect all
traffic to a particular page. This lets me take a site "offline" so I
can upload new features, update databases or whatever without having
the process visible to the world.
Is there a way to do this in umbraco? When I've done it in my sites I usually extend the global asax "handler" to preprocess every request and send it to a particular page, generally a static html page.
I know this is kinda old, but I had the same problem and Google brought me here, so thought I'd share what I found. I created a file called "app_offline.htm" (no L) in my site's root directory to achieve the desired effect.
Taking a Site Offline?
When I've built sites using plain old ASPNET, one of the features I like to include is a setting in web.config that lets me redirect all traffic to a particular page. This lets me take a site "offline" so I can upload new features, update databases or whatever without having the process visible to the world.
Is there a way to do this in umbraco? When I've done it in my sites I usually extend the global asax "handler" to preprocess every request and send it to a particular page, generally a static html page.
- Mark
You can just use the App_Offline file - http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx
Or you can use an ISAPI rewrite if you want to block all but certain IP's - http://blog.leekelleher.com/2009/09/29/putting-your-asp-net-web-application-in-maintenance-mode-using-isapi_rewrite/
Great, thanks!
- Mark
@slace... damn, I write up a blog post for you... and you get the karma points! haha ;-)
Sorry about that.
- Mark
No worries Mark... it's all good!
I've just tried the ISAPI_Rewrite method but found it ineffective.
The site just continues to load.
I've placed the .htaccess and offline.html file in the site's root and the contents of the .htaccess are exactly from the blog post.
I'me using IIS7 and Umbraco 4.7. What am I doing wrong?
Thanks, Matt
I know this is kinda old, but I had the same problem and Google brought me here, so thought I'd share what I found. I created a file called "app_offline.htm" (no L) in my site's root directory to achieve the desired effect.
Above post confirmed! It needs to be app_offline.htm, not ".html".
Bonus info:
Setting Umbraco into this mode allows the SQL Server CE to be downloaded. :)
is working on a reply...