Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
add comment

2 Answers

<configuration>
   <system.webServer>
      <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Found">
         <add wildcard="*.php" destination="/default.htm" />
      </httpRedirect>
   </system.webServer>
</configuration>
share|improve this answer
    
my pages without extensions. –  Eugene Jan 8 '12 at 13:47
add comment

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
add comment

Your Answer

 
discard

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.