3

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?

2
  • You just trailed off at the end there. Did you forget something?
    – Su'
    Jan 7, 2012 at 19:58
  • I think that's it
    – Eugene
    Jan 7, 2012 at 20:21

2 Answers 2

2
<configuration>
   <system.webServer>
      <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Found">
         <add wildcard="*.php" destination="/default.htm" />
      </httpRedirect>
   </system.webServer>
</configuration>
1
  • my pages without extensions.
    – Eugene
    Jan 8, 2012 at 13:47
1

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 and acknowledge you have read our privacy policy.

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