<%@ WebHandler Language="C#" Class="robotshandler" %> using System; using System.Web; public class robotshandler: IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("Sitemap: http://" + html.Domain + "/rss.aspx?type=sitemap\n"); context.Response.Write("\n\nUser-agent: *\n"); if (context.Request.ServerVariables["Https"]=="off"){ // HTTP context.Response.Write("Disallow: /reports.aspx\n"); } else { // HTTPS context.Response.Write("Disallow: /"); } } public bool IsReusable { get {return false;} } }