return File(file, content_type, "sitemap.xml");
}
+ [HttpGet("/robots.txt")]
+ public IActionResult Robots()
+ {
+ string path;
+ string content_type= "text/plain";
+
+#if !DEBUG
+ path = Environment.CurrentDirectory + "/release/netcoreapp2.1/publish/wwwroot/robots.txt";
+#else
+ path = Environment.CurrentDirectory + "/wwwroot/robots.txt";
+#endif
+
+ byte[] file = System.IO.File.ReadAllBytes(path);
+ return File(file, content_type, "robots.txt");
+ }
+
}
}
\ No newline at end of file
User-agent: *
Allow : /
-Sitemap: https://nicezip.wabiey.com/sitemap.xml
\ No newline at end of file
+Sitemap: https://nicezip.kr/sitemap
\ No newline at end of file