Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Consider you have a website with many virtual directories. Each VD is configured as an application.

How would you, in effect, turn off just ONE of those VD, or have it redirect to another page? You want to be sure that you don't turn off the entire site and all the other VD.

The scenario here is that there is a downtime or deployment happening, and you would like to redirect to an app_offline.htm page.

Question: How would you go about temporarily disabling just one virtual directory?

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

If your virtual directory is a separate ASP.NET application, you could put a HTML file with the name

 app_offline.htm

in the folder the virtual directory is associated with. The file must have a minimum length of 512 bytes and should contain the HTML you want to show to your website's visitors.

This will cause every request to that application to show the app_offline.htm page. See this blog post (Scott Guthrie).

share|improve this answer
    
Note: I wrote the answer before the question was edited adding the "app_offline.htm" part. :-) –  splattne Jul 27 '09 at 13:19
    
Brilliant! I wasn't aware of app_offline.htm -- you just solved a very similar problem for me :-) –  Chris_K Jul 27 '09 at 13:20
    
Thanks splatt. I think the app_offline bit in there on rev.1. You did help with the important configuration of the VD being an application. Thank you very much! –  p.campbell Jul 27 '09 at 13:35
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.