IIS: redirect everything to another URL, except for one Directory
Posted
by
DrStalker
on Server Fault
See other posts from Server Fault
or by DrStalker
Published on 2010-08-16T07:29:50Z
Indexed on
2011/01/08
10:55 UTC
Read the original article
Hit count: 337
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?
© Server Fault or respective owner