Skip to content

Commit

Permalink
fix: redirect multi sitemap sitemap.xml using route rules
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 6, 2024
1 parent 57bef21 commit e1bee81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ declare module 'vue-router' {
},
}
if (usingMultiSitemaps) {
nuxt.options.nitro.routeRules['/sitemap.xml'] = { redirect: '/sitemap_index.xml' }
nuxt.options.nitro.routeRules['/sitemap_index.xml'] = routeRules
if (typeof config.sitemaps === 'object') {
for (const k in config.sitemaps)
Expand Down

0 comments on commit e1bee81

Please sign in to comment.