Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Take down website to public, but leave for testing... "We're Not Open"

We are rolling out a site for a client using IIS tomorrow.

I am to take the site down to the general public (Sorry, we are updating message) and allow the client to test over the weekend after we perform the upgrade.

If it is successful, I open it to everbody - if not, I rollback.

What is the easiest way to put a "We're not open" sign for the general public, but leave the rest open to testers?

like image 686
Jason Avatar asked Nov 29 '22 07:11

Jason


2 Answers

Redirect via IIS. Create a new website in IIS and put your "Sorry updating" message in the Default.aspx. Then switch ports between the real site (will go from 80, to something else (6666)) and the 'maintenance' site (set on 80).

Then tell your testers to go to yoursite.com:6666.

Then switch the real site back to 80 after taking down the 'maintenance' site.

like image 151
Kon Avatar answered Dec 05 '22 05:12

Kon


I thought it would be worthwhile to mention ASP.NET 2.0+'s "app offline" feature. (Yes, I realize the questioner wants to leave the app up for testing, but I'm writing this for later readers who might come here with different needs).

If you really want to take the application offline for everyone (for instance to do server maintenance) there is a very simple option. All you have to do in ASP.NET 2.0 and higher is put a file with this name:

app_offline.htm

...in the root directory of your ASP.NET application. Put an appropriate "sorry come back later" message in there. That's it. The ASP.NET runtime does the rest.

Details on Scott Guthrie's blog.

like image 43
Tim Farley Avatar answered Dec 05 '22 05:12

Tim Farley