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.example.com/products/234

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

How it can be done in IIS 7?

  • 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" />
  • my pages without extensions. – Eugene Jan 8 '12 at 13:47

You could use the app_offline.htm feature. There is a great answer on StackOverflow about this:

How to use app_offline.htm

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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