The htaccess rules only allow your IP address to view the site (in order to perform the upgrade) and redirect all other visitors to an 'offline' or 'maintenance mode' page.
(ISAPI_Rewrite is commercial software - and you'll need a dedicated server - so its not always an option).
Other ideas? App_Offline.htm? or have another subdomain and swap them over during the upgrade?
Just had another idea... BUT it relies on Umbraco itself, so might not work at some point during an upgrade.
In the /config/umbracoSettings.config, there is an option called <EnableSplashWhileLoading> - set that to true. This will enable the 'loading' splash page to display for 10 seconds before redirecting to the requested URL.
Obviously to don't want to redirect them after 10 seconds... so modify the /config/splashes/booting.aspx page to remove the <META refresh> tag and customise it as you like.
There's a free equivalent to ISAPI_Rewrite, which is the donation-ware Ionic ISAPI Rewrite Filter (IIRF) - if I was using this, I'd have everything 302 (temp redirect) to an operational subdomain, unless accessed from a specific IP (yours) so you can still see the "live" site and check upgrade progress and ensure everything works AOK. Probably a better solution rather than using the blanket app_offline solution.
How to inform website-users while upgrading?
Hi
How do you inform the website-users while upgrading? I want to inform the users while I am upgrading like "the website is temporarly not availabe..".
Who has a good solution?
Thanks
Cornelia
Hi Cornelia,
I wrote a blog post about this a while ago, but it requires the use of ISAPI_Rewrite:
http://blog.leekelleher.com/2009/09/29/putting-your-asp-net-web-application-in-maintenance-mode-using-isapi_rewrite/
The htaccess rules only allow your IP address to view the site (in order to perform the upgrade) and redirect all other visitors to an 'offline' or 'maintenance mode' page.
(ISAPI_Rewrite is commercial software - and you'll need a dedicated server - so its not always an option).
Other ideas? App_Offline.htm? or have another subdomain and swap them over during the upgrade?
Cheers, Lee.
Just had another idea... BUT it relies on Umbraco itself, so might not work at some point during an upgrade.
In the /config/umbracoSettings.config, there is an option called <EnableSplashWhileLoading> - set that to true. This will enable the 'loading' splash page to display for 10 seconds before redirecting to the requested URL.
Obviously to don't want to redirect them after 10 seconds... so modify the /config/splashes/booting.aspx page to remove the <META refresh> tag and customise it as you like.
Cheers, Lee.
There's a free equivalent to ISAPI_Rewrite, which is the donation-ware Ionic ISAPI Rewrite Filter (IIRF) - if I was using this, I'd have everything 302 (temp redirect) to an operational subdomain, unless accessed from a specific IP (yours) so you can still see the "live" site and check upgrade progress and ensure everything works AOK. Probably a better solution rather than using the blanket app_offline solution.
Hope this helps.
Benjamin
Thanks for the answers. My hosting provider gives the possibility to use the Ionic ISAPI Rewrite Filter.
To Benjamin:
Can I write the following code (like Lee mentionned in his blog) in the IIRF.ini-File?
RewriteCond %{REQUEST_URI} !/offline.html$
RewriteCond %{REMOTE_ADDR} !^82\.13\.23\.230$
RewriteRule ^(.*)$ /offline.html [R=302,L]
Thanks
Cornelia
(probably going to cross-post with Benjamin now)
Yes, you should be able to use the same htaccess syntax with IIRF!
Good luck, Lee.
simple ... detailed solutions ... as i like :)
1-Create a document type 'Offline' (or other name you like)
2-Create content of type 'Offline'
3-Create a Master Macro and put it in your master pages
4-inside your Master macro:
umbraco.cms.businesslogic.web.Document offlineDoc = new umbraco.cms.businesslogic.web.Document([ID of your offline content node)]);
if (offlineDoc.Published)
{
bool bIsIpAuthorized = [some routine to filter IPS... you might put here your own here ;) ]
if (!bIsIpAuthorized)
{
Response.Redirect("~/Offline");
}
}
tcha ran !! :)
thank you
AS
is working on a reply...