<%@ WebHandler Language="C#" Class="MyNamespace.robotshandler" %> using System; using System.Web; namespace MyNamespace { public class robotshandler: IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("User-agent: *\n"); if(context.Request.Url.ToString().Contains("comprar-vender.")){ context.Response.Write("Sitemap: http://comprar-vender.mfrural.com.br/sitemap_produtos.ashx\n"); } else if(context.Request.Url.ToString().Contains("noticias.")){ context.Response.Write("Sitemap: http://noticias.mfrural.com.br/sitemap.ashx\n"); } else if(context.Request.Url.ToString().Contains("ruralshop.")) context.Response.Write("Sitemap: http://ruralshop.mfrural.com.br/sitemap_ruralshop.ashx\n"); else{ context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_categorias.ashx\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_busca.ashx\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_busca.ashx?pg=2\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_busca.ashx?pg=3\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_busca.ashx?pg=4\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_busca.ashx?pg=5\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_busca.ashx?pg=6\n"); context.Response.Write("Sitemap: http://www.mfrural.com.br/sitemap_noticias.ashx\n"); } } public bool IsReusable { get {return false;} } } }