]> insang Git - ZipProject.git/commitdiff
robots.txt 수정
authorjocloud <dhkq92@icloud.com>
Thu, 21 May 2020 15:45:45 +0000 (15:45 +0000)
committerjocloud <dhkq92@icloud.com>
Thu, 21 May 2020 15:45:45 +0000 (15:45 +0000)
ZipProject/Controllers/WebZipController.cs
ZipProject/wwwroot/robots.txt

index 65155458449aa211e9190f3e76989f81f5263ebc..9b2ff8ec28c307778091c17c06f8dc1ef2fcecd5 100644 (file)
@@ -155,6 +155,22 @@ namespace ZipProject.Controllers
       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
index 82a21426f81717adf1e097d7c378fdfc900e1311..4dbdb6d64caba4548cac02c0160d86a04b097307 100644 (file)
@@ -1,4 +1,4 @@
 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