I have an IIS server (IIS 6, Win 2003) that hosts the site http://www.foo.com.

I want any request to http://foo.com (no matter what path/filename is used) to redirect to http://www.bar.org/AwesomePage.html UNLESS the request is for http://www.foo.com/specialdir, in which case the HTML files in the local directory specialdir should be used.

The problem I have is once the redirect is set it also affects /specialdir - even if I right click on that directory and select "content should come from ... local directory" that change does not take effect, and the directory still shows as redirecting to http://www.bar.org/AwesomePage.html. The same thing happens if I try to set individual files to load from the local system instead of redirecting - IIS gives no error, but the change does not take effect and the files still show as being redirected.

How can I set specialdir to override the redirection to the new URL?

link|improve this question

feedback

2 Answers

On the other server, redirect just this dir back! It is more of a hack, but it works.

link|improve this answer
That would set up an endless loop of HTTP redirects. Which would be fun, but not helpful. :-) – DrStalker Aug 16 '10 at 9:11
feedback

oh, yes...

Well, the real solution is to use ISAPI_Rewrite from http://www.isapirewrite.com/ and write a regex for the redirection.

link|improve this answer
pls dont multi post like that, this is not a forum. pls read the faq – Nick Kavadias Jan 8 '11 at 11:07
feedback

Your Answer

 
or
required, but never shown

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