<%@ WebHandler Language="C#" Class="MyNamespace.robotshandler" %> Disallow: /practice-manual/redirect.cfm using System; using System.Web; namespace Dchs { public class robotshandler: IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("User-agent: *\n"); if (context.Request.ServerVariables["Https"]=="off"){ // HTTP context.Response.Write("Disallow: /_mm/\n"); context.Response.Write("Disallow: /_notes/\n"); context.Response.Write("Disallow: /_baks/\n"); context.Response.Write("Disallow: /MMWIP/\n"); context.Response.Write("Disallow: /CFIDE/\n"); context.Response.Write("Disallow: /adoption/education/intercountry/feedback/\n"); context.Response.Write("Disallow: /partners/documents/licensing-manual-p2-1-tracked-changes.pdf\n"); context.Response.Write("User-agent: googlebot\n"); context.Response.Write("Disallow: *.csi\n"); } else { // HTTPS context.Response.Write("Disallow: /"); } } public bool IsReusable { get {return false;} } } }