Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have IIS 7 website.

I need to redirect users during maintenance time to home page from other sub pages within site.

for example

if user request http://www.mysite.com/products/234

I need system to show default message, site under maintenance not 404 error

How it can be done in IIS 7?

share|improve this question
You just trailed off at the end there. Did you forget something? – Su' Jan 7 '12 at 19:58
I think that's it – Eugene Jan 7 '12 at 20:21
      <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Found">
         <add wildcard="*.php" destination="/default.htm" />
share|improve this answer
my pages without extensions. – Eugene Jan 8 '12 at 13:47

You could use the "app_offline.htm" feature. There's a great answer on Serverfault about this:

How to use app_offline.htm

We use this for our .Net sites and it works well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.