using System; using System.Net; namespace AllocsFixes.NetConnections.Servers.Web { public class SimpleRedirectHandler : PathHandler { string target; public SimpleRedirectHandler (string target) { this.target = target; } public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, HttpListenerBasicIdentity user) { resp.Redirect (target); } } }