From 4e6c867183aa808bced126cd66bce0b71893112b Mon Sep 17 00:00:00 2001 From: Paul Adam Davis Date: Sun, 7 Dec 2014 11:42:26 +0000 Subject: [PATCH] Change sitemap root location Closes #4590 - Removes `-index` from the root sitemap - Removes redirects (which send sitemap.xml to sitemap-index.xml) - Adjust tests --- core/server/data/sitemap/handler.js | 6 ------ core/shared/robots.txt | 2 +- core/shared/sitemap.xsl | 6 +++--- core/test/functional/routes/frontend_test.js | 9 +-------- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/core/server/data/sitemap/handler.js b/core/server/data/sitemap/handler.js index 49b823e4e4..24c3a34b23 100644 --- a/core/server/data/sitemap/handler.js +++ b/core/server/data/sitemap/handler.js @@ -16,13 +16,7 @@ module.exports = function (blogApp) { return sitemap.getSiteMapXml(type, page); }; - // Redirect normal sitemap.xml requests to sitemap-index.xml blogApp.get('/sitemap.xml', function (req, res) { - res.set({'Cache-Control': 'public, max-age=' + utils.ONE_YEAR_S}); - res.redirect(301, req.baseUrl + '/sitemap-index.xml'); - }); - - blogApp.get('/sitemap-index.xml', function (req, res) { res.set({ 'Cache-Control': 'public, max-age=' + utils.ONE_HOUR_S, 'Content-Type': 'text/xml' diff --git a/core/shared/robots.txt b/core/shared/robots.txt index c6b421f684..0120d9be2a 100644 --- a/core/shared/robots.txt +++ b/core/shared/robots.txt @@ -1,3 +1,3 @@ User-agent: * -Sitemap: /sitemap-index.xml +Sitemap: /sitemap.xml Disallow: /ghost/ diff --git a/core/shared/sitemap.xsl b/core/shared/sitemap.xsl index b2620c5d07..5344f7b0e2 100644 --- a/core/shared/sitemap.xsl +++ b/core/shared/sitemap.xsl @@ -95,7 +95,7 @@ -

← Back to index

+

← Back to index

@@ -135,13 +135,13 @@
-

← Back to index

+

← Back to index