We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4965d32 commit 334a4f7Copy full SHA for 334a4f7
src/module.ts
@@ -336,7 +336,9 @@ declare module 'vue-router' {
336
if (typeof config.sitemaps === 'object') {
337
for (const k in config.sitemaps) {
338
nuxt.options.nitro.routeRules[joinURL(config.sitemapsPathPrefix, `/${k}.xml`)] = routeRules
339
- nuxt.options.nitro.routeRules[`/${k}-sitemap.xml`] = { redirect: joinURL(config.sitemapsPathPrefix, `${k}.xml`) }
+ if (config.sitemapsPathPrefix && config.sitemapsPathPrefix !== '/') {
340
+ nuxt.options.nitro.routeRules[`/${k}-sitemap.xml`] = { redirect: joinURL(config.sitemapsPathPrefix, `${k}.xml`) }
341
+ }
342
}
343
344
else {
0 commit comments