From: jocloud Date: Thu, 21 May 2020 15:40:00 +0000 (+0000) Subject: sitemap기능작성 및 네이버,구글 웹마스터 기능 추가 X-Git-Url: https://git.insang.kr/gitweb/?a=commitdiff_plain;h=237f72e448efeba7c49b6e3303d9ca90c973faab;p=ZipProject.git sitemap기능작성 및 네이버,구글 웹마스터 기능 추가 --- diff --git a/ZipProject/Controllers/WebZipController.cs b/ZipProject/Controllers/WebZipController.cs index 1df5883..6515545 100644 --- a/ZipProject/Controllers/WebZipController.cs +++ b/ZipProject/Controllers/WebZipController.cs @@ -139,6 +139,22 @@ namespace ZipProject.Controllers return File(file, content_type, "StaticFile"); } + [HttpGet("/sitemap")] + public IActionResult Sitemap() + { + string path; + string content_type= "text/xml"; + +#if !DEBUG + path = Environment.CurrentDirectory + "/release/netcoreapp2.1/publish/wwwroot/sitemap.xml"; +#else + path = Environment.CurrentDirectory + "/wwwroot/sitemap.xml"; +#endif + + byte[] file = System.IO.File.ReadAllBytes(path); + return File(file, content_type, "sitemap.xml"); + } + } } \ No newline at end of file diff --git a/ZipProject/Views/Shared/_Layout.cshtml b/ZipProject/Views/Shared/_Layout.cshtml index 1d8bc6e..2582faf 100644 --- a/ZipProject/Views/Shared/_Layout.cshtml +++ b/ZipProject/Views/Shared/_Layout.cshtml @@ -13,6 +13,7 @@ + @ViewData["Title"] diff --git a/ZipProject/wwwroot/sitemap.xml b/ZipProject/wwwroot/sitemap.xml index 5f6c55b..94f7150 100644 --- a/ZipProject/wwwroot/sitemap.xml +++ b/ZipProject/wwwroot/sitemap.xml @@ -6,10 +6,10 @@ http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> - - - https://nicezip.wabiey.com/ - 2019-02-23T16:12:28+00:00 + + + https://nicezip.kr/ + 2019-02-23T16:12:28+00:00