Sitemap.xml routing
Unanswered
Bonga shad posted this in #help-forum
Bonga shadOP
Hello, I have this sitemap.ts which includes a sitemap function.
This, should create a sitemap.xml and it works good. But is not doing it in the route which I want.
I mean, if i go to localhost:3000/support/sitemap.xml it works good
But, if I define a new route in my Route.ts called “/soporte”, (for languages proposals) and I go to localhost:3000/soporte/sitemap.xml, this doesnt work. (404)
Any solution? Please, thanks you.
If u scroll down u can see code images
This, should create a sitemap.xml and it works good. But is not doing it in the route which I want.
I mean, if i go to localhost:3000/support/sitemap.xml it works good
But, if I define a new route in my Route.ts called “/soporte”, (for languages proposals) and I go to localhost:3000/soporte/sitemap.xml, this doesnt work. (404)
Any solution? Please, thanks you.
If u scroll down u can see code images
8 Replies
Bonga shadOP
@Bonga shad Click to see attachment
Can you share more file structure, preferably from app
You have just created a
/support routeas per the screenshot
Bonga shadOP
This support folder is inside a /src/app
Route.ts:
'/support/': {
es: '/soporte/',
it: '/supporto/',
pt: '/suporte/',
},
'/support/': {
es: '/soporte/',
it: '/supporto/',
pt: '/suporte/',
},
@Anay-208 You have just created a `/support` route
Bonga shadOP
I Also have tried to put this in Route.ts:
'/support/:page': {
es: '/soporte/:page',
it: '/supporto/:page',
pt: '/suporte/:page',
},
But this only works in local, when I push to gitlab I got:
Export encountered errors on following paths:
256#16 82.17 /support/sitemap.xml/route: /support/sitemap.xml
'/support/:page': {
es: '/soporte/:page',
it: '/supporto/:page',
pt: '/suporte/:page',
},
But this only works in local, when I push to gitlab I got:
Export encountered errors on following paths:
256#16 82.17 /support/sitemap.xml/route: /support/sitemap.xml
And where are you hosting the app?