You need to set a very simple redirect, from a specific location on your IIS web site or application, to a new URL? Then place this very simple default.aspx page at that location; in most of the cases, it works like a charm.
<%@ Page Language="C#"%>
Response.RedirectLocation = "http://new.location.net/optional/path";
Response.StatusCode = 301; // 301 = Moved Permanently | 302 = Object moved | 307 = Temporary redirect
This is aimed at those of us too lazy to enable and use the HTTP Redirection feature of IIS. That would work with much better performance, and would cover some additional functionality, and doesn't need the .NET managed pipeline... But sometimes lazy is good :)
For those in need of complex redirects, the optional UrlRewrite module is THE solution, but you'll need to install and learn creating redirect rules.
Best of luck to all!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.